Managed Object - VirtualMachineProvisioningChecker

Property of
ServiceContent
See also
CheckResult, HostSystem, ResourcePool, VirtualMachine, VirtualMachinePowerState, VirtualMachineRelocateSpec
Since
vSphere API 4.0


Managed Object Description

A singleton managed object that can answer questions about the feasibility of certain provisioning operations.

Properties

Name Type Description
None

Methods

Methods defined in this Managed Object
CheckMigrate_Task, CheckRelocate_Task, QueryVMotionCompatibilityEx_Task

CheckMigrate_Task

Tests the feasibility of a proposed MigrateVM_Task operation.
Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the VirtualMachineProvisioningChecker used to make the method call.
vmManagedObjectReference
to a VirtualMachine

The virtual machine we propose to migrate.
host*ManagedObjectReference
to a HostSystem

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*ManagedObjectReference
to a ResourcePool

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.
state*VirtualMachinePowerState

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.
testType*xsd:string[]

The set of tests to run. If this argument is not set, all tests will be run.
*Need not be set

Return Value

Type Description
ManagedObjectReference
to a Task

Faults

Type Description
InvalidArgumentThrown 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.
InvalidPowerStateThrown if the state argument is set and at least one of the specified virtual machines is not in that power state.
InvalidState
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.



CheckRelocate_Task

Tests the feasibility of a proposed RelocateVM_Task operation.
Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the VirtualMachineProvisioningChecker used to make the method call.
vmManagedObjectReference
to a VirtualMachine

The virtual machine we propose to relocate.
specVirtualMachineRelocateSpec

The specification of where to relocate the virtual machine. In cases where DRS would automatically select a host, all potential hosts are tested against.
testType*xsd:string[]


*Need not be set

Return Value

Type Description
ManagedObjectReference
to a Task

Faults

Type Description
InvalidArgumentin 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
InvalidStateThrown 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.
NotSupportedThrown if the virtual machine is marked as a template.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.



QueryVMotionCompatibilityEx_Task

Investigates the general VMotion compatibility of a set of virtual machines with a set of hosts. The virtual machine may be in any power state. Hosts may be in any connection state and also may be in maintenance mode.
Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the VirtualMachineProvisioningChecker used to make the method call.
vmManagedObjectReference[]
to a VirtualMachine[]

The set of virtual machines to analyze for compatibility. All virtual machines are assumed to be powered-on for the purposes of this operation.
hostManagedObjectReference[]
to a HostSystem[]

The set of hosts to analyze for compatibility. All hosts are assumed to be connected and not in maintenence mode for the purposes of this operation.

Return Value

Type Description
ManagedObjectReference
to a Task

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.