Virtual Machine Upgrade VM Task
Upgrades this virtual machine's virtual hardware to the latest revision that is supported by the virtual machine's current host.
Required privileges: VirtualMachine.Config.UpgradeVirtualHardware
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case VirtualMachine/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.
"UpgradeVMRequestType Object"
If specified, upgrade to that specified version. If not specified, upgrade to the most current virtual hardware supported on the host.
This method returns a Task object with which to monitor the operation.
"MoRefTask Object"
InvalidPowerState: if the power state is not poweredOff.
TaskInProgress: if the virtual machine is busy.
AlreadyUpgraded: if the virtual machine's hardware is already up-to-date.
NoDiskFound: if no virtual disks are attached to this virtual machine.
InvalidState: if the host is in maintenance mode, if an invalid version string is specified, or if the virtual machine is in a state in which the operation cannot be performed. For example, if the configuration information is not available.
"VimFault Object"
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/VirtualMachine/{moId}/UpgradeVM_Task