We recently upgraded from vSphere 5.5 to 6.5. The migration changed some of our rules.
I have a cluster with 4 hosts. I had 4 vms that I wanted, by default, to run on different hosts but could run on the same if needed.
There was a rule in 5.5 that enforced a should relationship, i.e, that each vm should run on different hosts when possible.
When we upgraded, it became a must rule. Is there an easy way to replicate the should rule easitly.
MohamadAlhoussein I covered this earlier and this is not what OP is after. A VM-VM anti-affinity rule is a "must" or "hard" rule. OP was wondering if there is a "soft" rule which doesn't involve explicit VM-to-host rule definitions which the answer is "no" at this time.
vSphere HA is not aware of those rules, so it will ignore them completely in case of HA events. If a host fails, a VM will restart on an available host even if it contains the other VM from the 4 VMs selected above.
That's not true any longer. DRS rules will apply by default and be respected in an HA failover event. In vSphere 6.0, there was a portion of the Flex client that allowed you to specify whether you wanted this behavior. In 6.5, that option is no longer present because the rules are respected by default. If you wish for them *not* to be respected, you must set one of two advanced options on your cluster: das.respectVmVmAntiAffinityRules or das.respectVmHostSoftAffinityRules.
The option is already there.
I was hoping for a more efficient method.
I have to create a vm group with a single vm for each of the 4 vms.
I have to crate a host group with a single host for each of the 4 hosts.
Then I have to create this rule for each vm/host pair.
All so I can get 4 vms to run on different hosts most of the time.
Then you can use a VM-VM anti-affinity rule to keep each VM separate. With 4 VMs and 4 hosts, DRS will put one on each host.
Unfortunately, that is a must relationship.
The first probably comes closest to what I want. I'm just now sure they took out the "should" relationship in the VM-VM rules.
Pretty sure the "Should" part comes into play if you place the host in maintence mode, its the only time I've seen one move.
If you use VM-VM anti-affinity rules, it will prevent a host from entering maintenance mode. If you need a soft rule, you'll have to create VM-to-Host groupings.
Hi marvinb
If I understand you well, What you are trying to accomplish can be done with a simple MUST Anti-Affinity rule to keep the 4 VMs separated on the 4 hosts you have.
vSphere HA is not aware of those rules, so it will ignore them completely in case of HA events. If a host fails, a VM will restart on an available host even if it contains the other VM from the 4 VMs selected above.
This will save you from creating separate host group for each host and separate VM group for each VM and then creating 4 DRS rules with "SHOULD" relationship.
Please let me know if this fulfills your needs.
Regards,
MohamadAlhoussein I covered this earlier and this is not what OP is after. A VM-VM anti-affinity rule is a "must" or "hard" rule. OP was wondering if there is a "soft" rule which doesn't involve explicit VM-to-host rule definitions which the answer is "no" at this time.
vSphere HA is not aware of those rules, so it will ignore them completely in case of HA events. If a host fails, a VM will restart on an available host even if it contains the other VM from the 4 VMs selected above.
That's not true any longer. DRS rules will apply by default and be respected in an HA failover event. In vSphere 6.0, there was a portion of the Flex client that allowed you to specify whether you wanted this behavior. In 6.5, that option is no longer present because the rules are respected by default. If you wish for them *not* to be respected, you must set one of two advanced options on your cluster: das.respectVmVmAntiAffinityRules or das.respectVmHostSoftAffinityRules.
Thanks daphnissov for the clarification.
It appears that I will have to create a set of vm-host rules with preferential settings to get what I want.
I appreciate the input.