Service Instance Validate Migration

Service Instance Validate Migration

Deprecated as of vSphere API 4.0, use VirtualMachineProvisioningChecker instead.

Checks the validity of a set of proposed migrations.

A migration is the act of changing the assigned execution host of a virtual machine, which can result from invoking MigrateVM_Task or RelocateVM_Task.

Required privileges: System.View

Request
URI
POST
https://{api_host}/sdk/vim25/{release}/ServiceInstance/{moId}/ValidateMigration
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 ServiceInstance/{moId}.

string
release
Required

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


Request Body
ValidateMigrationRequestType of type(s) application/json
Required
"ValidateMigrationRequestType Object"
array of object
vm
Required

The set of virtual machines intended for migration.

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.

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; additionally if resource tests are requested then this parameter is required.

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.

Authentication
This operation uses the following authentication methods.
Responses
200

A set of events that describe the warnings or errors that would apply if the proposed set of migrations were executed.

[
    "Event Object"
]
array of Event
Optional

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.

NoActiveHostInCluster: if a target host is not specified and a cluster associated with a target pool does not contain at least one potential target host. A host must be connected and not in maintenance mode in order to be considered as a potential target host.

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}/ServiceInstance/{moId}/ValidateMigration