Virtual Machine Provisioning Checker Check Migrate Task
Tests the feasibility of a proposed MigrateVM_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.
"CheckMigrateRequestType Object"
The virtual machine we propose to migrate.
The target host on which the virtual machines will run. The host parameter may be left unset if the compute resource associated with the target pool represents a stand-alone host or a DRS-enabled cluster. In the former case the stand-alone host is used as the target host. In the latter case, each connected host in the cluster that is not in maintenance mode is tested as a target host. If the virtual machine is a template then either this parameter or the pool parameter must be set.
The target resource pool for the virtual machines. If the pool parameter is left unset, the target pool for each particular virtual machine's migration will be that virtual machine's current pool. If the virtual machine is a template then either this parameter or the host parameter must be set. The pool parameter must be set for testing the feasibility of migration to a different datacenter or different vCenter service.
The power state that the virtual machines must have. If this argument is not set, each virtual machine is evaluated according to its current power state.
The set of tests to run. If this argument is not set, all tests will be run. See CheckTestTypeEnum for possible values.
InvalidArgument: if the target host(s) and target pool for a migration are not associated with the same compute resource, or if the host parameter is left unset when the target pool is associated with a non-DRS cluster.
InvalidPowerState: if the state argument is set and at least one of the specified virtual machines is not in that power state.
"InvalidState Object"
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/VirtualMachineProvisioningChecker/{moId}/CheckMigrate_Task