Virtual Machine Defragment All Disks
Defragment all virtual disks attached to this virtual machine.
Required privileges: VirtualMachine.Interact.DefragmentAllDisks
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.
No Content
InvalidState: if the virtual machine is not connected.
InvalidPowerState: if the virtual machine is poweredOn.
TaskInProgress: if the virtual machine is busy.
FileFault: if there is an error accessing the disk files.
"VimFault Object"
curl -X POST -H 'Authorization: <value>' https://{api_host}/sdk/vim25/{release}/VirtualMachine/{moId}/DefragmentAllDisks