Virtual Machine Detach Disk Task
Detach a disk from this virtual machine.
Required privileges: VirtualMachine.Config.RemoveDisk
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.
"DetachDiskRequestType Object"
This data object type describes an identifier class which is globally unique to identify the associated object.
NotFound: if the disk object cannot be found.
VmConfigFault: if the virtual machine's configuration is invalid.
FileFault: if there is a problem creating or accessing the virtual machine's files for this operation.
InvalidState: if the operation cannot be performed in the current state of the virtual machine. For example, because the virtual machine's configuration is not available.
"VimFault Object"
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/VirtualMachine/{moId}/DetachDisk_Task