AVD scaling plan exclusion tag does not exclude host from total "max session limit" on host pool

Copper Contributor

Bear with me :), I'll start at the beginning

A host pool has a property called “max session limit”. This is the amount of users PER host.

Then we have scaling plans that can use a tag in order to exclude a VM (AVD Host) from being scaled. But when the exclusion tag is met it does not retract the number from the “max session limit”.


I’ll try to explain the issue with an example.

Let’s say we have 10 hosts that can host 20 sessions each, so 200 sessions total in the host pool.

Let say the scaling plan is set for 60% in the morning. So 6 host boot in the morning.


When updating to the new image we temporarily have the double amount of host so we have 20 hosts. 10 of which are having the AVD maintenance tag so are not being scaled. In order to be able to return to the previous image we leave this up for couple days.


In this example the 60% is taken from the 20 hosts instead of the 10 hosts that are active. So the scaling would want to boot 12 hosts instead of 6.


A workaround being used is having a second scaling plan for the time that the hosts are doubled, to set to 30% instead of 60%. But is quite some work for all the clients we’re managing, as this whole process is all automated.


I think when a host is in maintenance mode it should not be calculated in the available sessions. Microsoft please change this or create a slider so you can choose. This way a host cannot actually be maintained when in maintenance mode because there will be too little hosts available.

7 Replies
HI - you need to add the tag and enable drain mode.. then scaling plan should leave your hosts untouched

Thanks @tommykneetz for your input.


Although what you say is true that was not exactly the point I trying to get at.


Let say you have 10 hosts (with max session limit of 20 per host) and you put 5 of them in drainmode and add the tag, effectively having 5 hosts available. The scaling plan on the other hand still thinks it can host 200 sessions, even though in practice we can host only 100 sessions. 


No sessions will go to the hosts that are in drain mode, but if the scaling setting "Minimum percentage of hosts (%) " is set to 80% it will try to spin up 8 hosts, which it cannot, so will spin up only 5.


Where I would expect it would take 80% of 5 hosts it actually takes 80% of 10 hosts.

I would love the option to change this.


Thank you @tommykneetz for checking that. Much appreciated.
I'de love Microsoft to change this or at least make it an option to set this manually. I think this is very confusing and more difficult to manage in a world where we should redeploy to do updates.

Thanks again for you effort.

@LeonPlaat I agree, it makes much more sense to put a host in maintenance mode and have it automatically excluded from any scaling plan. That's the way Citrix works, you put a host in maintenance mode and that's all you need to do to get it to not take any new connections.

Microsoft, please make the change.