NSX upgrade failed. Error: Upgrade failed. Failed getting host recommendation from DRS to enter maintenance mode for cluster 'cluster name'. Reason, 'This operation would violate a virtual machine affinity/anti-affinity rule.'
search cancel

NSX upgrade failed. Error: Upgrade failed. Failed getting host recommendation from DRS to enter maintenance mode for cluster 'cluster name'. Reason, 'This operation would violate a virtual machine affinity/anti-affinity rule.'

book

Article ID: 414588

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • ESXi transport node upgrade failed with the error, "Upgrade failed. Failed getting host recommendation from DRS to enter maintenance mode for cluster 'cluster name'." Reason, 'This operation would violate a virtual machine affinity/anti-affinity rule.
  • Host upgrade requires DRS to be set to Fully Automated mode as a prerequisite.

Environment

VMware NSX
VMware VCenter 7.X
VMware VCenter 8.X

Cause

VM affinity or anti-affinity rules are configured on the cluster referenced in the error message, preventing the migration of virtual machines.
As a result, the host cannot enter maintenance mode, leading to the upgrade failure.

Please be aware some affinity rules are considered over-rideable such as VM groups to Host groups and others are not such as anti-affinity rules for VMs when limited hosts are available. KB Understanding the functionality of the DRS anti-affinity rule to separate virtual machines by host explains such a limitation that would block DRS.

Resolution

Set the DRS to "fully automated" and disable all the VM affinity rules on the cluster referenced in the error message. 

Steps:

  • Log in to the vCenter.
  • Select the cluster referenced in the error message
  • Click on the configure tab and then click on vSphere DRS.
  • Set the DRS automation settings to "Fully Automated" if set to Manual or Partially automated.
  • Click on VM/Host Rules and disable all the rules listed.