SDDC Manager Pre-check complains about anti-affinity rule while upgrading SDDC components
search cancel

SDDC Manager Pre-check complains about anti-affinity rule while upgrading SDDC components

book

Article ID: 382488

calendar_today

Updated On:

Products

VMware SDDC Manager VMware Cloud Foundation

Issue/Introduction

When performing an upgrade pre-check in SDDC Manager, the validation fails with the following error message displayed in the SDDC Manager UI:

Entering maintenance mode would violate affinity rules: VI-1-anti-affinity-rule-nsxt


Environment

VMware Cloud Foundation 5.1.0 and later

VMware SDDC Manager 5.1.0 and later

Cause

  • This error occurs because the target vSphere cluster does not have enough ESXi hosts to satisfy the configured VM-Host anti-affinity rules when a host enters Maintenance Mode during the upgrade process.
  • SDDC Manager creates anti-affinity rules (such as for NSX-T Managers or Edge Nodes) to prevent critical cluster nodes from running on the same ESXi host. If putting one host into maintenance mode forces these VMs to coexist on a remaining host, the rule is violated, and the pre-check fails.

Resolution

To proceed with the upgrade, use one of the following two options.

Option 1: Remove any hosts that are currently in maintenance mode, or add a new host to the cluster (recommended). Expanding the cluster ensures there are enough resources to maintain high availability and satisfy anti-affinity rules during the upgrade maintenance cycle.

  1. Log in to the SDDC Manager UI.
  2. Navigate to the specific Workload Domain and Cluster.
  3. Follow the standard procedure to Add a Host.
    Reference: Add a Host to a vSphere Cluster Using the SDDC Manager UI
  4. Once the host is added, retry the upgrade pre-check.

Option 2: Temporarily disable the anti-affinity rule. If adding a host is not immediately possible, disabling the specific rule mentioned in the error message (e.g., VI-1-anti-affinity-rule-nsxt) will allow the upgrade to proceed.

Steps to follow:

  1. Log in to the vSphere Client (https://<vcenter_server_fqdn>/ui).
  2. In the Hosts and Clusters inventory, navigate to the specific Cluster where the error was reported.
  3. Select the Cluster object and click the Configure tab.
  4. Under Configuration, select VM/Host Rules.
  5. Locate the rule mentioned in the error message (e.g., VI-1-anti-affinity-rule-nsxt).
  6. Select the rule and click Edit.
  7. Uncheck the Enable rule checkbox.
  8. Click OK.
  9. Return to SDDC Manager and retry the upgrade pre-check.

Note: It is recommended to re-enable this rule after the upgrade process is complete to ensure the resiliency of your management components.