VMware Cloud Community
mike_sims
Enthusiast
Enthusiast

Evenly distribute VMs across a cluster

Hello all,

I have a need to ensure that several groups of VMs are evenly distributed across all the hosts in a cluster. These are View linked-clone pools in a HA / DRS cluster, but DRS is balancing on CPU & Memory loads, whereas what I'm trying to do is to ensure that the VM's in a given pool are spread as evenly as possible across the hosts in the cluster.

I'll give an example: I have a pool of 12 VMs and 4 hosts in the cluster. Optimally, I would like to ensure that each host has 3 VMs from this pool on it with the idea that in an HA event, we don't lose a majority of one pool. We don't want to have 10 of the 12 VMs running on one host and have that host fail. DRS doesn't do that as far as I see.

I have a script which works, but has issues and I believe those issues have to do with my programatic approach being flawed. So, I leave it to those more experienced to offer suggestions from which I can learn. I can post my script if needed, but I'm interested in "cold" opinions unbiased by my attempt.

Thanks for your time.

Mike

0 Kudos
3 Replies
LucD
Leadership
Leadership

Did you disable DRS on that cluster ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
mike_sims
Enthusiast
Enthusiast

Sorry, I should have mentioned that. Yes. DRS is disabled.

0 Kudos
mike_sims
Enthusiast
Enthusiast

So, apparently, I'm an idiot. Smiley Happy

If I have enough capacity in the cluster - and I do, almost N+2 - and the VMs are all of similar CPU/Mem usage profiles - they are - and I distribute the VMs as described, I shouldn't need DRS.

I assume that View Composer will re-create the linked clones on the same host where they are during a recomposition, so there is no way for the VMs to move if DRS is off and therefore they stay balanced.

Hmmmm....

0 Kudos