VMware Cloud Community
lucasbernadsky
Hot Shot
Hot Shot

VM anti-affinity rule

Hey, guys.

I need to create a VM anti-affinity rule but the only option I am seeing is the "MUST RUN" policy in the affinity rule. Is there any way to change ir to "Should run"?

I do not want to have any problem if the host which the VM runs in fails.

Thanks in advance

Reply
0 Kudos
10 Replies
daphnissov
Immortal
Immortal

Are you not seeing this?

pastedImage_0.png

Reply
0 Kudos
lucasbernadsky
Hot Shot
Hot Shot

Yeah, but that is not what I need. In your screenshot you are showing a VM-Host affinity rule. I need a VM-VM anti affinity rule. I don´t care in which hosts the VMs are running, I only care that they are running in two different ones.

Thanks for taking some time to answer.

Reply
0 Kudos
daphnissov
Immortal
Immortal

There is only "separate" or "keep together". There isn't a "must" or "should" clause to go along with those.

Reply
0 Kudos
lucasbernadsky
Hot Shot
Hot Shot

Dear @daphnissov​, I think I wasn´t clear.  let me show you what I am talking about specificly (VMs are dummies, for testing purposes);

pastedImage_3.png

Reply
0 Kudos
daphnissov
Immortal
Immortal

I would have to re-test this but I'm not sure if that's a rule that HA enforces. Have you tested this in an HA failure scenario?

Reply
0 Kudos
lucasbernadsky
Hot Shot
Hot Shot

I am currently building my environment for that! When I finish I let you know!

Reply
0 Kudos
daphnissov
Immortal
Immortal

Please do, otherwise I have a couple test labs I can run this scenario in.

Reply
0 Kudos
lucasbernadsky
Hot Shot
Hot Shot

I tested this. The host that I shut down had one VM in an anti-affinity rule and another VM without any rule applying to it. Shutdown the host and the VM within the anti-affinity rule failed. The other VM rebooted in another ESXi of the cluster

Reply
0 Kudos
daphnissov
Immortal
Immortal

Ok, good to know. So you'll have to use VM-Host affinity rules as a workaround for now, it sounds like.

Reply
0 Kudos
lucasbernadsky
Hot Shot
Hot Shot

Yup, have done that. But it will not resolve my problem completely. In the desired scenario, in a anti-affinity rule with two VMs, the VMs should be able to be placed in N-1 hosts in the cluster, where N is the number of hosts in the cluster. (N-1: all the hosts in the cluster, excluding the one that the other VM is placed).

Reply
0 Kudos