The VM-Host affinity rule allows you to control which hosts in the cluster can run which VMs and requires that at least one VM DRS group and at least one host DRS group are created before managing host affinity rules.
The typical use case is about licensing, where only a subset of ESXi hosts are licensed for a particular software that the VM consumes; Oracle, for example. Without DRS, you would need either a dedicated cluster for Oracle VMs (because you need to assign an Oracle license to each physical server where the VM might run), or, by using DRS affinity rules, you can specify the subset of hosts that will be used by such VMs.
To create a VM-Host affinity rule, proceed as follows:
- From vSphere Client, right-click ...