Update Hardware
Updates the virtual hardware settings of a virtual machine.
Request
URLURL
Path Parameters
Path Parameters
Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
Specification for updating the virtual hardware settings of the virtual machine.
{
"upgrade_policy": "NEVER",
"upgrade_version": "VMX_03"
}
The Hardware.UpgradePolicy enumerated type defines the valid virtual hardware upgrade policies for a virtual machine.
NEVER : Do not upgrade the virtual machine when it is powered on.
AFTER_CLEAN_SHUTDOWN : Run scheduled upgrade when the virtual machine is powered on after a clean shutdown of the guest operating system.
ALWAYS : Run scheduled upgrade when the virtual machine is powered on.
Possible values are: NEVER , AFTER_CLEAN_SHUTDOWN , ALWAYS
The Hardware.Version enumerated type defines the valid virtual hardware versions for a virtual machine. See https://kb.vmware.com/s/article/1003746 (Virtual machine hardware versions (1003746)).
VMX_03 : Hardware version 3, first supported in ESXi 2.5.
VMX_04 : Hardware version 4, first supported in ESXi 3.0.
VMX_06 : Hardware version 6, first supported in WS 6.0.
VMX_07 : Hardware version 7, first supported in ESXi 4.0.
VMX_08 : Hardware version 8, first supported in ESXi 5.0.
VMX_09 : Hardware version 9, first supported in ESXi 5.1.
VMX_10 : Hardware version 10, first supported in ESXi 5.5.
VMX_11 : Hardware version 11, first supported in ESXi 6.0.
VMX_12 : Hardware version 12, first supported in Workstation 12.0.
VMX_13 : Hardware version 13, first supported in ESXi 6.5.
VMX_14 : Hardware version 14, first supported in ESXi 6.7.
VMX_15 : Hardware version 15, first supported in ESXi 6.7 Update 2.
VMX_16 : Hardware version 16, first supported in Workstation 15.0.
VMX_17 : Hardware version 17, first supported in ESXi 7.0.0-0.
VMX_18 : Hardware version 18, first supported in ESXi 7.0 U1.
VMX_19 : Hardware version 19, first supported in ESXi 7.0 U2.
VMX_20 : Hardware version 20, first supported in ESXi 8.0.0.1.
Possible values are: VMX_03 , VMX_04 , VMX_06 , VMX_07 , VMX_08 , more...
Authentication
Errors
Errors
com.vmware.vapi.std.errors.already_in_desired_state : if the virtual machine is already configured for the desired hardware version. | com.vmware.vapi.std.errors.invalid_argument : if the requested virtual hardware version is not newer than the current version. | com.vmware.vapi.std.errors.unsupported : if the requested virtual hardware version is not supported by the server.
com.vmware.vapi.std.errors.unauthorized : if the user doesn’t have the required privileges.
com.vmware.vapi.std.errors.error : if the system reports an error while responding to the request. | com.vmware.vapi.std.errors.resource_busy : if the virtual machine is busy performing another operation. | com.vmware.vapi.std.errors.resource_inaccessible : if the virtual machine’s configuration state cannot be accessed.
com.vmware.vapi.std.errors.service_unavailable : if the system is unable to communicate with a service to complete the request.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: patch
x-vmw-doc-deprecated-path: /rest/vcenter/vm/{vm}/hardware
x-vmw-doc-operation: update