# Data Object - ClusterVmHostRuleInfo(vim.cluster.VmHostRuleInfo)

Extends
  ClusterRuleInfo
Since
  vSphere API 4.1

## Data Object Description

A ClusterVmHostRuleInfo object identifies virtual machines and host groups that determine virtual machine placement. The virtual machines and hosts referenced by a VM-Host rule must be in the same cluster.

A VM-Host rule identifies the following groups.

- A virtual machine group (ClusterVmGroup).
- Two host groups - an affine host group and an anti-affine host group (ClusterHostGroup). At least one of the groups must contain one or more hosts.

ClusterVmHostRuleInfo stores only the names of the relevant virtual machine and host groups. The group contents are stored in the virtual machine and host group objects.

When you modify a VM-Host rule, only the fields that are specified are set.

Properties

Name | Type | Description
--- | --- | ---
affineHostGroupName* | xsd:string | Name of the affine host group (ClusterHostGroup.name). The affine host group identifies hosts on which vmGroupName virtual machines can be powered-on. The value of the mandatory property determines how the Server interprets the rule.
antiAffineHostGroupName* | xsd:string | Name of the anti-affine host group (ClusterHostGroup.name). The anti-affine host group identifies hosts on which vmGroupName virtual machines should not be powered-on. The value of the mandatory property determines how the Server interprets the rule.
vmGroupName* | xsd:string | Virtual group name (ClusterVmGroup.name). The virtual group may contain one or more virtual machines.
Properties inherited from ClusterRuleInfo
enabled, inCompliance, key, mandatory, name, ruleUuid, status, userCreated
Properties inherited from DynamicData
None

*Need not be set
Show WSDL type definition
<complexType xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="ClusterVmHostRuleInfo"> <complexContent> <extension base="vsan:ClusterRuleInfo"> <sequence> <element name="vmGroupName" type="xsd:string" minOccurs="0"/> <element name="affineHostGroupName" type="xsd:string" minOccurs="0"/> <element name="antiAffineHostGroupName" type="xsd:string" minOccurs="0"/> </sequence> </extension> </complexContent> </complexType>