Virtual Machine Provisioning Checker Check Relocate Task
Tests the feasibility of a proposed RelocateVM_Task operation.
Required privileges: System.View
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 VirtualMachineProvisioningChecker/{moId}
.
The vSphere release schema. The current specification covers vSphere 9.0.0.0 APIs.
"CheckRelocateRequestType Object"
The virtual machine we propose to relocate.
The specification of where to relocate the virtual machine. In cases where DRS would automatically select a host, all potential hosts are tested against. The host parameter in the spec may be left unset for checking feasibility of relocation to a different datacenter or different vCenter service, if the compute resource associated with the target pool represents a stand-alone host, the host is tested against, otherwise each connected host in the cluster that is not in maintenance mode represented by the target pool is tested as a target host.
The set of tests to run. If this argument is not set, all tests will be run. See CheckTestTypeEnum for possible values.
NotSupported: if the virtual machine is marked as a template.
InvalidArgument: in the following cases:
- the target host and target pool are not associated with the same compute resource
- the target pool represents a cluster without DRS enabled, and the host is not specified
- Datastore in a diskLocator entry is not specified
- the specified device ID cannot be found in the virtual machine's current configuration
- the object specified in relocate cannot be found
- the target pool is not specified while checking feasibility of relocation to a different datacenter or different vCenter service
- the datastore is not specified when testType parameter includes datastore tests while checking feasibility of relocation to a different datacenter or a different vCenter service
InvalidState: if the operation cannot be performed because of the host or virtual machine's current state. For example, if the host is in maintenance mode, or if the virtual machine's configuration information is not available.
"InvalidState Object"
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/VirtualMachineProvisioningChecker/{moId}/CheckRelocate_Task