Symptoms:
Unable to add or remove Virtual Machine from vm-host affinity rule. The task starts and gets stuck at 0%
vpxd.log
YYYY-MM-DD HH:MM:SS verbose vpxd[06104] [Originator@6876 sub=StateLock opID=lov4yey9-449735-auto-9n0o-h5:70039410-ac] [VpxdStateLock] Couldn't lock vim.ClusterComputeResource:domain-xxxx in mode EXCLUSIVE. Will retry in a bit...
VMware vCenter Server 7.0.x
VMware vCenter Server 8.0.x
ReconfigureEx needs EXCLUSIVE lock for data consistency.
Changing Virtual Machine affinity rules is classified under a cluster reconfiguration, since Virtual Machine affinity rules affect placement decisions throughout the cluster. The cluster reconfigure operation requires an EXCLUSIVE state lock and that stalls until vMotion completes.