# Data Object - ClusterAffinityRuleSpec(vim.cluster.AffinityRuleSpec)

Extends
  ClusterRuleInfo
See also
  VirtualMachine
Since
  2.0

## Data Object Description

The ClusterAffinityRuleSpec data object defines a set of virtual machines. DRS will attempt to schedule the virtual machines to run on the same host.

Properties

Name | Type | Description
--- | --- | ---
vm | ManagedObjectReference[] to a VirtualMachine[] | List of virtual machine references.
Properties inherited from ClusterRuleInfo
enabled, inCompliance, key, mandatory, name, ruleUuid, status, userCreated
Properties inherited from DynamicData
None

Show WSDL type definition
<complexType xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="ClusterAffinityRuleSpec"> <complexContent> <extension base="vsan:ClusterRuleInfo"> <sequence> <element name="vm" type="vsan:ManagedObjectReference" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType>