Unmount Image
If vSphere APIs begin with /rest (vs /api), any maps are consumed/returned instead as arrays of objects, each containing a key and a value property field.
Unmounts a previously mounted CD-ROM using an ISO image as a backing. if you do not have all of the privileges described as follows: - Operation execution requires System.Read. - The resource VirtualMachine referenced by the parameter vm requires VirtualMachine.Config.AddRemoveDevice. - The resource com.vmware.vcenter.vm.hardware.Cdrom referenced by the parameter cdrom requires System.Read.
Request
URLURL
https://{api_host}/rest/com/vmware/vcenter/iso/image/id:{vm}?~action=unmount
Parameters
Parameters
string
vm
Required
The identifier of the virtual machine from which to unmount the virtual CD-ROM.
The parameter must be an identifier for the resource type: VirtualMachine.
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
Example: b00db39f948d13ea1e59b4d6fce56389
Request Body
Request Body
IsoImageUnmountRequestBody of type application/json (required){
"cdrom": "string"
}
string
cdrom
Required
The device identifier of the CD-ROM. The parameter must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Cdrom.
cURL Command
curl -X POST -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" -H "Content-Type: application/json" -d '{"cdrom":"string"}' https://{api_host}/rest/com/vmware/vcenter/iso/image/id:{vm}?~action=unmount
Errors
409
com.vmware.vapi.std.errors.not_allowed_in_current_state : When the operation is not allowed on the virtual machine in its current state.
404
com.vmware.vapi.std.errors.not_found : If the virtual machine identified by vm is not found or the cdrom does not identify a virtual CD-ROM in the virtual machine.
On This Page
Image Operations
post
post