Starting vSphere 6.5 will aim to respect the rule, but will violate it if it cannot. If that behavior is undesired you can disable the restart through an advanced setting. I described that here:
That seems to be at odds with the words in "VMware Docs - vSphere HA Advanced Options"
The wording is the same for 6.5 and 6.7:
Determines if vSphere HA enforces VM-VM anti-affinity rules. The default value is "true" and rules are enforced even if vSphere DRS is not enabled. In this case, vSphere HA does not fail over a virtual machine if doing so violates a rule, but it issues an event reporting there are insufficient resources to perform the failover. This option can also be set to "false", whereby the rules are not enforced.
This suggests that HA will not failover a VM if a rule would be broken.
Is your YellowBricks article effectively a correction to the VMware documentation?
If so, is there a way to achieve the behaviour described in the VMware documentation (as above)?
Re-reading my post and some internal documentation, HA will not violate the rule indeed. The documentation is correct, it seems I misunderstood development. thanks for pointing that out.
EDIT: I also now realize where the confusion is. The VM-Host rules HA will try to adhere to and is seen as a should rule. The anti-affinity is a must rule.
That's good news and really helps with the scenario we are developing for.
The host affinity one I'll have to think about. I take it that this has no options available to make it a hard rule?