Enabling vCenter Server High Availability (VCHA) fails This operation would violate a virtual machine affinity/anti-affinity rule
search cancel

Enabling vCenter Server High Availability (VCHA) fails This operation would violate a virtual machine affinity/anti-affinity rule

book

Article ID: 420020

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Enabling vCenter Server High Availability (VCHA) fails 'This operation would violate a virtual machine affinity/anti-affinity rule'.

VCHA UI interface shows invalid VCHA configuration with an error similar to "vCenter HA has invalid configuration. Remove vCenter HA to destroy the current cluster configuration and set up vCenter HA again".

Environment

vCenter Server 7.X

vCenter Server 8.X

Cause

During VCHA deployment vpxd automatically creates anti-affinity rule for active, passive and witness nodes that prevents any pair of VCHA VMs residing on the same host. 

Error is caused due to lack of ESXi hosts for deployment, in production deployment a minimum of 3 ESXi hosts are required.

Resolution

To avoid DRS anti-affinity rule errors when deploying VCHA nodes on the same host:

Go to vCenter Advanced Settings

Set the following parameter:

config.vpxd.vcha.drsAntiAffinity = False

Note: After the VCHA configuration, nodes can be moved to different ESXI hosts and the Advance settings parameter reverted back to True

Or

To ensure the Active, Passive, and Witness nodes can power on after deployment, either disable the vcha-* VM/Host rules or delete the rule members once the passive node has been created.