Hi community,
I have a problem with understanding how VM-Host rule conflicts behave.
VM-VM is clear so far, the vCenter reports a problem directly when creating rules in conflict, deactivates the new rule and displays the conflict on the VM/Host Rules overview. So far so good :)
But especially for VM-Host rules the Broadcom Techdoc states:
So it is possible for you to create a rule that conflicts with the other rules you are using. When two VM-Host affinity rules conflict, the older one takes precedence and the newer rule is deactivated. DRS only tries to satisfy activated rules and deactivated rules are ignored.
Using VM-Host Affinity Rules
Broadcom |
remove preview |
|
Using VM-Host Affinity Rules |
You use a VM-Host affinity rule to specify an affinity relationship between a group of virtual machines and a group of hosts. When using VM-Host affinity rules, you should be aware of when they could be most useful, how conflicts between rules are resolved, and the importance of caution when setting required affinity rules. |
View this on Broadcom > |
|
|
Now I have built the following very simple test scenario:
3 hosts, 1 VM, 2 rules
- Host1 (0 VMs)
- Host2 (0 VMs)
- Host3 (VM1)
I have created two host groups, one for Host1 and one for Host2, plus one VM group for VM1.
Then I created two VM-Host rules:
Rule 1: VM1 must run on Host1
Rule 2: VM1 must run on Host2
The VMs are all located on Host3.
As expected and described, creating this works without any problems, knowingly it creates a conflict.
However, according to the description in the techdocs, I would now have expected DRS to deactivate the newer rule, as it obviously creates a conflict, or at least to enforce the rule that was created first (Rule1) and migrate VM1 to Host1. Instead, however, DRS no longer shows any recommendation at all and only a DRS Fault. VM1 simply stays on Host3.
The fault is shown two times and both the same, I would also think it shows two faults, one for migration to Host1 and another one for Host2, but both show onlyHost1:
Could not fix hard VM/Host affinity rule violation
Fault:
Virtual Machine VM1 on Host1 would violate a virtual machine - host affinity rule
Prevented Recommendation:
Migrate VM1 from Host3 to any host
Why is the behavior different than described in the Techdocs? Or is this to be expected?
I am using the following new versions:
vCenter 8.0 Update 3 Build 24322831
ESXi 8.0 Update 3 Build 2402251