6.0.1

Table Of Contents
Create a VM-Host Affinity Rule
You can create VM-Host affinity rules to specify whether or not the members of a selected virtual machine
DRS group can run on the members of a specific host DRS group.
Prerequisites
Create the virtual machine and host DRS groups to which the VM-Host affinity rule applies.
Procedure
1 Browse to the cluster in the vSphere Web Client navigator.
2 Click the Manage tab.
3 Click Settings and click DRS Rules.
4 Click Add.
5 In the Create DRS Rule dialog box, type a name for the rule.
6 From the Type drop down menu, select Virtual Machines to Hosts.
7 Select the virtual machine DRS group and the host DRS group to which the rule applies.
8 Select a specification for the rule.
n
Must run on hosts in group. Virtual machines in VM Group 1 must run on hosts in Host Group A.
n
Should run on hosts in group. Virtual machines in VM Group 1 should, but are not required, to
run on hosts in Host Group A.
n
Must not run on hosts in group. Virtual machines in VM Group 1 must never run on host in Host
Group A.
n
Should not run on hosts in group. Virtual machines in VM Group 1 should not, but might, run on
hosts in Host Group A.
9 Click OK.
Using VM-Host Affinity Rules
You use a VM-Host affinity rule to specify an affinity relationship between a group of virtual machines and
a group of hosts. When using VM-Host affinity rules, you should be aware of when they could be most
useful, how conflicts between rules are resolved, and the importance of caution when setting required
affinity rules.
One use case where VM-Host affinity rules are helpful is when the software you are running in your virtual
machines has licensing restrictions. You can place such virtual machines into a DRS group and then create a
rule that requires them to run on a host DRS group that contains only host machines that have the required
licenses.
NOTE When you create a VM-Host affinity rule that is based on the licensing or hardware requirements of
the software running in your virtual machines, you are responsible for ensuring that the groups are
properly set up. The rule does not monitor the software running in the virtual machines nor does it know
what non-VMware licenses are in place on which ESXi hosts.
If you create more than one VM-Host affinity rule, the rules are not ranked, but are applied equally. Be
aware that this has implications for how the rules interact. For example, a virtual machine that belongs to
two DRS groups, each of which belongs to a different required rule, can run only on hosts that belong to
both of the host DRS groups represented in the rules.
Chapter 11 Using DRS Clusters to Manage Resources
VMware, Inc. 89