Motion compatibility error: "Virtual machine 'VM_NAME' on host 'HOST_NAME' would violate a virtual machine - host affinity rule"
search cancel

Motion compatibility error: "Virtual machine 'VM_NAME' on host 'HOST_NAME' would violate a virtual machine - host affinity rule"

book

Article ID: 425394

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

When performing a vMotion migration (Change Compute Resource) using the vSphere Client, you encounter an error during the Select Compute Resource step of the wizard.

  • You select a destination host for the virtual machine.

  • The Compatibility pane at the bottom of the wizard displays an error icon (red X) or warning.

  • The specific error message shown is: "Virtual machine 'VM_NAME' on host 'HOST_NAME' would violate a virtual machine - host affinity rule."

The Next button is greyed out, preventing the migration from proceeding.

Environment

VMware vSphere 7.x

VMware vSphere 8.x

Cause

This error occurs because of a strict DRS Affinity Rule configured on the cluster.

The virtual machine is part of a VM Group that is bound to a specific Host Group with a mandatory rule: "Must run on hosts in group".

Because the destination host you selected is not a member of that required Host Group, vCenter Server blocks the migration to ensure the affinity rule is not violated.

Resolution

To resolve this issue and proceed with the migration, you must modify the affinity rule by:

  1. Disable the affinity rule if not longer required
  2. Add the host to the host group so migration can work.

Note: The Affinity rule are usually created for Software Licensing Compliance, Hardware Dependencies or High Availability (HA) Impact for the VMs, ensure to validate disabling/editing the rule will not violate your environment requirements.

Additional Information

For more details, see Using DRS Affinity Rules in the VMware vSphere Documentation.