A VM-Host affinity policy describes a relationship between a category of VMs and a category of hosts.
VM-Host affinity policies can be useful when host-based licensing requires VMs that are running certain applications to be placed on hosts that are licensed to run those applications. They can also be useful when virtual machines with workload-specific configurations require placement on hosts that have certain characteristics.
A VM-Host affinity policy establishes an affinity relationship between a category of virtual machines and a category of hosts. After the policy is created, the placement engine in your SDDC deploys VMs in the category covered by the policy on hosts in the category covered by the policy.
- A policy cannot prevent a host from entering maintenance mode. If the host needs to be put into maintenance mode, VMs with an affinity for the host are automatically migrated to another host in the cluster, then migrated back when the maintenance completes and the host becomes available.
- A policy cannot prevent a host configured for HA from executing a failover. VMs with an affinity for the failed host can be migrated to any available host in the cluster.
- A policy cannot prevent a VM from powering-on. If a VM subject to a host affinity policy specifies a resource reservation that no host can meet, it is powered on on any available host.
Prerequisites
This operation is restricted to users who have the CloudAdmin role.