Virtual Machine Provisioning Checker Check Migrate Task

Virtual Machine Provisioning Checker Check Migrate Task

Tests the feasibility of a proposed MigrateVM_Task operation.

Required privileges: System.View

Request
URI
POST
https://{api_host}/sdk/vim25/{release}/VirtualMachineProvisioningChecker/{moId}/CheckMigrate_Task
COPY
Path Parameters
string
moId
Required

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}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 9.0.0.0 APIs.


Request Body
CheckMigrateRequestType of type(s) application/json
Required
"CheckMigrateRequestType Object"
vm
Required

The virtual machine we propose to migrate.

host
Optional

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.

pool
Optional

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.

state
Optional

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.

array of string
testType
Optional

The set of tests to run. If this argument is not set, all tests will be run. See CheckTestTypeEnum for possible values.

Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns MoRefTask of type(s) application/json
"MoRefTask Object"

500

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.

Returns InvalidState of type(s) application/json
"InvalidState Object"

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/VirtualMachineProvisioningChecker/{moId}/CheckMigrate_Task