Creating virtual machines to host affinity rules
We can create rules that will determine VM-Host DRS placement rules. This is done by creating "virtual machines to hosts" affinity rules. The rules determine whether a group of virtual machines can run on a group of chosen ESXi hosts.
The creation of VMs to hosts affinity rules requires DRS hosts/VMs groups to be created. Read the recipe Creating host and VM DRS groups for instructions.
How to do it…
The following procedure will help you create a virtual machines to hosts affinity rule.
From the vCenter's inventory home, navigate to the Hosts and Clusters view.
Select the cluster and navigate to Manage | Settings | DRS Rules and click on Add… to bring-up the Create DRS Rule window.
At the Create DRS Rule window, supply a name for the rule, choose the rule type as Virtual Machines to Hosts. Select a VM Group, a rule and a Host Group and click on OK to create the rule.
How it works…
The rule can indicate either a requirement or a preference.
The "must...