Before you can create a VM-Host affinity rule, you must create the host DRS group and the virtual machine DRS group that the rule applies to.

For a cluster of virtual machines on one physical host, create one host DRS group that contains both the ESXi hosts. For example, HostGroup_1 contains ESXi_HOST_1, ESXi_HOST_2.

For a cluster of virtual machines across physical hosts, create one host DRS group that contains all the ESXi hosts. For example, HostGroup_1 contains ESXi_HOST_1 running WSFC_VM_1, ESXi_HOST_2 running WSFC_VM_2 …... ESXi_HOST_5 running WSFC_VM_5 and ESXi_HOST_6 as a standby host.

Procedure

  1. Browse to the cluster in the vSphere Client.
  2. Click Configure.
  3. Under Configuration, select VM/Host Groups and click Add.
  4. In the Create VM/Host Group dialog box, type a name for the group (for example, HostGroup_1).
  5. Select Host Group from the Type drop down box and click Add.
  6. Click the check box next to a host to add it. Continue this process until all desired hosts have been added.
  7. Click OK.