Limit the max number of VMs per host in HA environment

Clint84

New Member
Nov 12, 2024
6
4
3
TL ; DR - I don't care which host the High Availability VMs move to, as long as it doesn't exceed 4 VMs per host. Can this be done?

Full Story -
I am planning out a 4 host cluster (and 1 QDevice) of PVE with HA active using CEPH Storage and plan to run 8 Windows Server VMs across all hosts. I am going to purchase licensing for 4 VMs per host to keep costs down, but I do not want to pin VMs to specific machines or restrict them either; I want them to be able to move to any host to allow for failure in any of the hosts. Is there a way to limit the number of VMs running per host to 4 so that if one host goes down the cluster will pick a host with <4 VMs to move HA capable VMs to? I am trying to stay within the licensing terms of Windows Server.

For instance:
Host 1 = 2 VMs
Host 2 = 2 VMs
Host 3 = 3 VMs
Host 4 = 1 VM

If Host 3 goes down, the cluster will not try and transfer all VMs to Host 1 or Host 2 since that will be >4, but it will split them or move them all to Host 4. Or say 2 hosts go down, I want it to balance the remaining servers to 4 VMs each, not 5 and 3.

Is this viable, or do I have just be mindful of hosts going down and fix any migrations that result in >4 VMs per host?
 
Last edited:
I don't know if this is exactly what you want, but this could work:

Datacenter -> Options -> Cluster Resource Scheduling -> Basic (Resource Count) and the check the Rebalance on start.

I am trying to stay within the licensing terms of Windows Server.
How would they be able to detect this?
 
I don't know if this is exactly what you want, but this could work:

Datacenter -> Options -> Cluster Resource Scheduling -> Basic (Resource Count) and the check the Rebalance on start.


How would they be able to detect this?
I'm not wanting it to detect Windows VMs specifically, just to identify the total number of VMs and limit it to 4. If I license 4 Windows VMs per server, and all my expected VMs at this time will be Windows Server, that should passively keep me in compliance by never exceeding 4.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!