Affinity / Anti-Affinity Rules

For performance reasons, for example, you can Create an affinity rule. The DRS (Distributed Resource Scheduler) will then keep the VMs on the same ESXi host.
Otherwise, with a anti-affinity rule, the DRS will maintain the VMs on different ESXi hosts to, for example, prevent access failure if one ESXi host goes down.

More details: HERE

Prerequisites

Affinity Rules

From the Data Center tab > Click on a Data Center > Affinity Rules > NEW

Define:

  • A Name for the rule
  • Check the boxes Enabled and Required
  • The VMs to add to the rule

Click the SAVE button to save. The rule is created, and the 2 VMs will run on the same ESXi.

Anti-Affinity Rules

Select NEW and define:

  • A Name for the rule
  • Check the boxes Enabled and Required
  • The VMs to add to the rule

The rule is created, and the 2 VMs are on different ESXi hosts.

You can Edit or Delete the rules using the buttons