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 MSCS_VM_1, ESXi_HOST_2 running MSCS_VM_2 …... ESXi_HOST_5 running MSCS_VM_5 and ESXi_HOST_6 as a standby host.
- Browse to the cluster in the vSphere Web Client navigator.
- Click the Manage tab.
- Click Settings, click DRS Groups and click Add.
- In the DRS Group dialog box, type a name for the group (for example, HostGroup_1).
- Select Host DRS Group from the Type drop down box and click Add.
- Click the check box next to a host to add it. Continue this process until all desired hosts have been added.
- Click OK.