Virtual Machine Consolidate VM Disks Task
Consolidate the virtual disk files of the virtual machine by finding hierarchies of redo logs that can be combined without violating data dependency.
The redundant redo logs after merging are then deleted. Consolidation improves I/O performance since less number of virtual disk files need to be traversed; it also reduces the storage usage. However additional space is temporarily required to perform the operation. Use EstimateStorageForConsolidateSnapshots_Task to estimate the temporary space required. Consolidation can be I/O intensive, it is advisable to invoke this operation when guest is not under heavy I/O usage.
Required privileges: VirtualMachine.State.RemoveSnapshot
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case VirtualMachine/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.
This method returns a Task object with which to monitor the operation.
{
"_typeName": "string",
"type": "string",
"value": "string"
}
TaskInProgress: if the virtual machine is busy.
FileFault: if if there is a problem creating or accessing the virtual machine's files for this operation. Typically a more specific fault for example NoDiskSpace is thrown.
InvalidState: if the operation cannot be performed because of the virtual machine's current state. For example, if the virtual machine configuration information is not available.
VmConfigFault: if a virtual machine configuration issue prevents consolidation. Typically, a more specific fault is thrown such as InvalidDiskFormat if a disk cannot be read, or InvalidSnapshotFormat if the snapshot configuration is invalid.
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}