6.5.1

Table Of Contents
Create a VM-VM Affinity Rule
You can create VM-VM anity rules to specify whether selected individual virtual machines should run on
the same host or be kept on separate hosts.
N If you use the vSphere HA Specify Failover Hosts admission control policy and designate multiple
failover hosts, VM-VM anity rules are not supported.
Procedure
1 Browse to the cluster in the vSphere Web Client navigator.
2 Click the  tab.
3 Under , click VM/Host Rules.
4 Click Add.
5 In the Create VM/Host Rule dialog box, type a name for the rule.
6 From the Type drop-down menu, select either Keep Virtual Machines Together or Separate Virtual
Machines.
7 Click Add.
8 Select at least two virtual machines to which the rule will apply and click OK.
9 Click OK.
VM-VM Affinity Rule Conflicts
You can create and use multiple VM-VM anity rules, however, this might lead to situations where the
rules conict with one another.
If two VM-VM anity rules are in conict, you cannot enable both. For example, if one rule keeps two
virtual machines together and another rule keeps the same two virtual machines apart, you cannot enable
both rules. Select one of the rules to apply and disable or remove the conicting rule.
When two VM-VM anity rules conict, the older one takes precedence and the newer rule is disabled. DRS
only tries to satisfy enabled rules and disabled rules are ignored. DRS gives higher precedence to preventing
violations of anti-anity rules than violations of anity rules.
VM-Host Affinity Rules
A VM-Host anity rule species whether or not the members of a selected virtual machine DRS group can
run on the members of a specic host DRS group.
Unlike a VM-VM anity rule, which species anity (or anti-anity) between individual virtual machines,
a VM-Host anity rule species an anity relationship between a group of virtual machines and a group of
hosts. There are 'required' rules (designated by "must") and 'preferential' rules (designated by "should".)
A VM-Host anity rule includes the following components.
n
One virtual machine DRS group.
n
One host DRS group.
n
A designation of whether the rule is a requirement ("must") or a preference ("should") and whether it is
anity ("run on") or anti-anity ("not run on").
Because VM-Host anity rules are cluster-based, the virtual machines and hosts that are included in a rule
must all reside in the same cluster. If a virtual machine is removed from the cluster, it loses its DRS group
aliation, even if it is later returned to the cluster.
vSphere Resource Management
88 VMware, Inc.