anti affinity hyper-v 2019

matteu31 452 Reputation points


I setup a new Hyper-v 2019 cluster 2 nodes and build anti affinity rules but it's not working. Is there any special requirements or limitations ?

VM stay on the same node.

I use microsoft documentation :

$AntiAffinity = New-Object System.Collections.Specialized.StringCollection
(Get-ClusterGroup -Name "DC1").AntiAffinityClassNames = $AntiAffinity
(Get-ClusterGroup -Name "DC2").AntiAffinityClassNames = $AntiAffinity

I can see both DC1 and DC2 with DC anti affinity group DC with the following command
Get-ClusterGroup | fl AntiAffinityClassNames

A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,062 questions
0 comments No comments
{count} votes