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 the ESXi hosts. For example, HostGroup_1 contains ESXi_HOST_1 and ESXi_HOST_2.

For a cluster of virtual machines across physical hosts, create groups with sets of hosts that do not overlap. This ensures that virtual machines placed in different host groups do not ever run on the same host simultaneously.


In the vSphere Client, right-click the cluster in the inventory and select Edit Settings.


In the left pane of the cluster Settings dialog box under vSphere DRS, select DRS Groups Manager.


In the Host DRS Groups section, click Add.


In the DRS Group dialog box, type a name for the group (for example, HostGroup_1).


In the left pane, select a host and click >> to add it to the group.


Click OK.