# Managed Object - VirtualMachineCompatibilityChecker(vim.vm.check.CompatibilityChecker)

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

## Managed Object Description

A singleton managed object that can answer questions about compatibility of a virtual machine with a host.

Properties

Name | Type | Description
--- | --- | ---
None

Methods

Methods defined in this Managed Object
CheckCompatibility_Task, CheckPowerOn_Task, CheckVmConfig_Task

# CheckCompatibility_Task(checkCompatibility)

Tests whether or not a virtual machine could be placed on the given host in the given resource pool.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the VirtualMachineCompatibilityChecker used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | The virtual machine we'd like to place. Since vSphere API 4.0
host* P | ManagedObjectReference to a HostSystem | The host we would like the virtual machine to execute on. The host parameter may be left unset if the compute resource associated with the pool represents a stand-alone host or a DRS-enabled cluster. In the former case the stand-alone host is used. In the latter case, each connected host in the cluster that is not in maintenance mode is tested. If the virtual machine is a template then either this parameter or the pool parameter must be set. Since vSphere API 4.0
pool* P | ManagedObjectReference to a ResourcePool | The resource pool we would like the virtual machine to reside in. If the pool parameter is left unset, then the virtual machine's current pool is assumed. If the virtual machine is a template then either this parameter or the host parameter must be set. Since vSphere API 4.0
testType* P | xsd:string[] | The set of tests to run. If this argument is not set, all tests will be run. See CheckTestType for possible values. Since vSphere API 4.0

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference to a Task |

Faults

Type | Description
--- | ---
DatacenterMismatch | Thrown if the provided host and pool do not belong to the same datacenter.
InvalidArgument | Thrown if the desired host and pool are not associated with the same compute resource, the host parameter is left unset when the specified pool is associated with a non-DRS cluster, or if the specified vm does not exist.
InvalidState | Thrown 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.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# CheckPowerOn_Task(checkPowerOn)

Tests whether the provided virtual machine can be powered on on the given host and/or resource pool.

Required Privileges
  System.View
Since
  vSphere API 6.7

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the VirtualMachineCompatibilityChecker used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | The virtual machine to power on. Since vSphere API 6.7
host* P | ManagedObjectReference to a HostSystem | The host on which we want to power on the virtual machine. The host parameter may be left unset if the compute resource associated with the pool represents a stand-alone host or a DRS-enabled cluster. In the former case the stand-alone host is used. In the latter case, each connected host in the cluster that is not in maintenance mode is tested. Either this parameter or the pool parameter must be set. Since vSphere API 6.7
pool* P | ManagedObjectReference to a ResourcePool | The resource pool we would like the virtual machine to run in. If the pool parameter is left unset, we use the host's root resource pool. Since vSphere API 6.7
testType* P | xsd:string[] | The set of tests to run. If this argument is not set, all tests will be run. See CheckTestType for possible values. Since vSphere API 6.7

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference to a Task |

Faults

Type | Description
--- | ---
DatacenterMismatch | Thrown if the provided host and pool do not belong to the same datacenter.
InvalidArgument | Thrown if the desired host and pool are not associated with the same compute resource, the host parameter is left unset when the specified pool is associated with a non-DRS cluster, or if the provided vm does not exist.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# CheckVmConfig_Task(checkVmConfig)

Tests whether the provided virtual machine specification can be applied on the given host and resource pool.

Required Privileges
  System.View
Since
  vSphere API 6.7

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the VirtualMachineCompatibilityChecker used to make the method call.
spec P | VirtualMachineConfigSpec | The specification of the virtual machine to create. Since vSphere API 6.7
vm* P | ManagedObjectReference to a VirtualMachine | The existing virtual machine to apply the spec to. If this is not provided, the spec is assumed to be for the creation of a new virtual machine. Since vSphere API 6.7
host* P | ManagedObjectReference to a HostSystem | The host we would like the virtual machine to execute on. The host parameter may be left unset if the compute resource associated with the pool represents a stand-alone host or a DRS-enabled cluster. In the former case the stand-alone host is used. In the latter case, each connected host in the cluster that is not in maintenance mode is tested. If the virtual machine is a template, then either this parameter or the pool parameter must be set. Since vSphere API 6.7
pool* P | ManagedObjectReference to a ResourcePool | The resource pool we would like the virtual machine to reside in. If the pool parameter is left unset, then we use the host's root resource pool. Since vSphere API 6.7
testType* P | xsd:string[] | The set of tests to run. If this argument is not set, all tests will be run. See CheckTestType for possible values. Since vSphere API 6.7

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference to a Task |

Faults

Type | Description
--- | ---
DatacenterMismatch | Thrown if the provided host and pool do not belong to the same datacenter.
InvalidArgument | Thrown if the desired host and pool are not associated with the same compute resource, the host parameter is left unset when the specified pool is associated with a non-DRS cluster, or if the provided vm does not exist.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None