1. Operations
2. vcenter
3. vm
4. hardware
5. boot

## vcenter vm hardware boot: update

Updates the boot-related settings of a virtual machine.

### Request:

#### HTTP request

PATCH https://{server}/rest/vcenter/vm/{vm}/hardware/boot

#### Path Parameters

Name | Type | Description
--- | --- | ---
Required
vm | string | Virtual machine identifier.

#### Request Body Structure:

- JSON
- XML

{
"spec": {
"delay": 1,
"efi_legacy_boot": true,
"enter_setup_mode": true,
"network_protocol": "IPV4",
"retry": true,
"retry_delay": 1,
"type": "BIOS"
}
}
<?xml version="1.0" ?>
<ns0:Update-Input xmlns:ns0="http://vmware.com/vcenter/vm/hardware/boot" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<spec>
<network_protocol>IPV4</network_protocol>
<retry_delay>1</retry_delay>
<delay>1</delay>
<retry>true</retry>
<type>BIOS</type>
<enter_setup_mode>true</enter_setup_mode>
<efi_legacy_boot>true</efi_legacy_boot>
</spec>
</ns0:Update-Input>

#### Request Body Parameters:

Name | Type | Description
--- | --- | ---
bold = required
spec | update_spec | Specification for updating the boot-related settings of the virtual machine.
spec.type | string | Firmware type to be used by the virtual machine. Optional. If unset, the value is unchanged.
spec.efi_legacy_boot | boolean | Flag indicating whether to use EFI legacy boot mode. Optional. It is only relevant when type has value EFI. If unset, the value is unchanged.
spec.network_protocol | string | Protocol to use when attempting to boot the virtual machine over the network. Optional. It is only relevant when type has value EFI. If unset, the value is unchanged.
spec.delay | long | Delay in milliseconds before beginning the firmware boot process when the virtual machine is powered on. This delay may be used to provide a time window for users to connect to the virtual machine console and enter BIOS setup mode. Optional. If unset, the value is unchanged.
spec.retry | boolean | Flag indicating whether the virtual machine should automatically retry the boot process after a failure. Optional. If unset, the value is unchanged.
spec.retry_delay | long | Delay in milliseconds before retrying the boot process after a failure; applicable only when vcenter.vm.hardware.boot.info.retry is true. Optional. If unset, the value is unchanged.
spec.enter_setup_mode | boolean | Flag indicating whether the firmware boot process should automatically enter setup mode the next time the virtual machine boots. Note that this flag will automatically be reset to false once the virtual machine enters setup mode. Optional. If unset, the value is unchanged.

### Response:

#### HTTP Status Code: 200

None

#### Errors:

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.
400 | invalid_argument | if one of the provided settings is not permitted; for example, specifying a negative value for `delay`.
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.