vcenter vm hardware boot device: set
Sets the virtual devices that will be used to boot the virtual machine. The virtual machine will check the devices in order, attempting to boot from each, until the virtual machine boots successfully. If the array is empty, the virtual machine will use a default boot sequence. There should be no more than one instance of vcenter.vm.hardware.boot.device.entry for a given device type except ETHERNET in the array.
Request:
HTTP request
PUT https://{server}/rest/vcenter/vm/{vm}/hardware/boot/device
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
vm | string | Virtual machine identifier. |
Request Body Structure:
{
"devices": [
{
"disks": [
"obj-103",
"obj-103"
],
"nic": "obj-103",
"type": "CDROM"
},
{
"disks": [
"obj-103",
"obj-103"
],
"nic": "obj-103",
"type": "CDROM"
}
]
}
"devices": [
{
"disks": [
"obj-103",
"obj-103"
],
"nic": "obj-103",
"type": "CDROM"
},
{
"disks": [
"obj-103",
"obj-103"
],
"nic": "obj-103",
"type": "CDROM"
}
]
}
<?xml version="1.0" ?>
<ns0:Set-Input xmlns:ns0="http://vmware.com/vcenter/vm/hardware/boot/device" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<devices-array>
<array-item>
<nic>obj-103</nic>
<type>CDROM</type>
<disks-array>
<array-item>obj-103</array-item>
<array-item>obj-103</array-item>
</disks-array>
</array-item>
<array-item>
<nic>obj-103</nic>
<type>CDROM</type>
<disks-array>
<array-item>obj-103</array-item>
<array-item>obj-103</array-item>
</disks-array>
</array-item>
</devices-array>
</ns0:Set-Input>
<ns0:Set-Input xmlns:ns0="http://vmware.com/vcenter/vm/hardware/boot/device" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<devices-array>
<array-item>
<nic>obj-103</nic>
<type>CDROM</type>
<disks-array>
<array-item>obj-103</array-item>
<array-item>obj-103</array-item>
</disks-array>
</array-item>
<array-item>
<nic>obj-103</nic>
<type>CDROM</type>
<disks-array>
<array-item>obj-103</array-item>
<array-item>obj-103</array-item>
</disks-array>
</array-item>
</devices-array>
</ns0:Set-Input>
Request Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
devices | entry[] | Ordered list of boot devices. |
devices[].type | string | Virtual device type. Defines the valid device types that may be used as bootable devices. Value is one of: CDROM: Virtual CD-ROM device. DISK: Virtual disk device. ETHERNET: Virtual Ethernet adapter. FLOPPY: Virtual floppy drive. |
devices[].nic | string | Virtual Ethernet device. Ethernet device to use as boot device for this entry. Optional. It is only relevant when type has value ETHERNET. This field is optional and it is only relevant when the value of type is ETHERNET.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Ethernet . When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Ethernet . |
devices[].disks | string[] | Virtual disk device. List of virtual disks in boot order. Optional. It is only relevant when type has value DISK. This field is optional and it is only relevant when the value of type is DISK.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: com.vmware.vcenter.vm.hardware.Disk . When operations return a value of this structure as a result, the field will contain identifiers for the resource type: com.vmware.vcenter.vm.hardware.Disk . |
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 is not found, or if any of the specified virtual devices is not found. |
400 | invalid_argument | if a any of the CDROM , DISK , ETHERNET , FLOPPY values appears in more than one entry with the exception of ETHERNET, which may appear multiple times if the virtual machine has been configured with multiple Ethernet adapters. |
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. |