vcenter vm hardware cdrom: update
Updates the configuration of a virtual CD-ROM device.
Request:
HTTP request
PATCH https://{server}/rest/vcenter/vm/{vm}/hardware/cdrom/{cdrom}
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
vm | string | Virtual machine identifier. |
cdrom | string | Virtual CD-ROM device identifier. |
Request Body Structure:
{
"spec": {
"allow_guest_control": true,
"backing": {
"device_access_type": "EMULATION",
"host_device": "string",
"iso_file": "string",
"type": "ISO_FILE"
},
"start_connected": true
}
}
"spec": {
"allow_guest_control": true,
"backing": {
"device_access_type": "EMULATION",
"host_device": "string",
"iso_file": "string",
"type": "ISO_FILE"
},
"start_connected": true
}
}
<?xml version="1.0" ?>
<ns0:Update-Input xmlns:ns0="http://vmware.com/vcenter/vm/hardware/cdrom" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<spec>
<allow_guest_control>true</allow_guest_control>
<backing>
<device_access_type>EMULATION</device_access_type>
<iso_file>string</iso_file>
<type>ISO_FILE</type>
<host_device>string</host_device>
</backing>
<start_connected>true</start_connected>
</spec>
</ns0:Update-Input>
<ns0:Update-Input xmlns:ns0="http://vmware.com/vcenter/vm/hardware/cdrom" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<spec>
<allow_guest_control>true</allow_guest_control>
<backing>
<device_access_type>EMULATION</device_access_type>
<iso_file>string</iso_file>
<type>ISO_FILE</type>
<host_device>string</host_device>
</backing>
<start_connected>true</start_connected>
</spec>
</ns0:Update-Input>
Request Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
spec | update_spec | Specification for updating the virtual CD-ROM device. |
spec.backing | backing_spec | Physical resource backing for the virtual CD-ROM device. This field may only be modified if the virtual machine is not powered on or the virtual CD-ROM device is not connected. Optional. If unset, the value is unchanged. |
spec.backing.type | string | Backing type for the virtual CD-ROM device. Defines the valid backing types for a virtual CD-ROM device. Value is one of: ISO_FILE: Virtual CD-ROM device is backed by an ISO file. HOST_DEVICE: Virtual CD-ROM device is backed by a device on the host where the virtual machine is running. CLIENT_DEVICE: Virtual CD-ROM device is backed by a device on the client that is connected to the virtual machine console. |
spec.backing.iso_file | string | Path of the image file that should be used as the virtual CD-ROM device backing. Optional. It is only relevant when type has value ISO_FILE. This field is optional and it is only relevant when the value of type is ISO_FILE. |
spec.backing.host_device | string | Name of the device that should be used as the virtual CD-ROM device backing. Optional. It is only relevant when type has value HOST_DEVICE. If unset, the virtual CD-ROM device will be configured to automatically detect a suitable host device. |
spec.backing.device_access_type | string | Access type for the device backing. Optional. It is only relevant when type has value [HOST_DEVICE, CLIENT_DEVICE]. If unset, defaults to EMULATION. |
spec.start_connected | boolean | Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. Optional. If unset, the value is unchanged. |
spec.allow_guest_control | boolean | Flag indicating whether the guest can connect and disconnect the device. Optional. If unset, the value is unchanged. |
Response:
HTTP Status Code: 200
NoneErrors:
HTTP Status Code | Type | Description |
---|---|---|
500 | error | if the system reports an error while responding to the request. |
404 | not_found | if the virtual machine or virtual CD-ROM device is not found. |
400 | not_allowed_in_current_state | if one or more of the fields specified in the spec parameter cannot be modified due to the current power state of the virtual machine or the connection state of the virtual CD-ROM device. |
400 | resource_busy | if the virtual machine is busy performing another operation. |
400 | resource_inaccessible | if the virtual machine's configuration state cannot be accessed. |
503 | service_unavailable | if the system is unable to communicate with a service to complete the request. |
401 | unauthenticated | if the user can not be authenticated. |
403 | unauthorized | if the user doesn't have the required privileges. |