M365Con 2027 – free online conference · 11–22 Jan 2027 · 120 sessions m365con.net

2026-11-20

Autoscaling for Virtual Desktops – Simply Explained

Follow the showNew episodes on Microsoft 365, Copilot and more, free in your podcast app.Apple PodcastsSpotify
Cover: Autoscaling for Virtual Desktops – Simply Explained
Your virtual desktops billed you all day, even while nobody was signed in. Autoscaling decides how many machines actually run, so you stop paying for the quiet hours. In this episode of Simply Explained you will learn: - Why an idle virtual desktop still costs money for every minute it runs - How…

Show notes

Your virtual desktops billed you all day, even while nobody was signed in. Autoscaling decides how many machines actually run, so you stop paying for the quiet hours. In this episode of Simply Explained you will learn:

  • Why an idle virtual desktop still costs money for every minute it runs
  • How the day is cut into four phases: ramp-up, peak, ramp-down and off-peak
  • Which three numbers decide almost every autoscaling decision
  • How to turn machines off without throwing people out of their sessions
  • What a typical scaling plan looks like when you set it up
  • Where autoscaling goes wrong and where it honestly stops working

Simply Explained by M365.FM breaks down Microsoft 365, Azure and modern IT topics in clear, jargon-free language. Hosted by Mirko Peters. Become a supporter of this podcast: https://www.spreaker.com/podcast/m365-fm-microsoft-365-azure-cloud-power-platform-ai--6704921/support. This episode includes AI-generated content.

Apple Podcasts · YouTube · Deezer

Host: Mirko Peters

Guests

Guests in this episode:

Transcript

Transcript (TXT)

Read the full transcript

Speaker 1: The virtual desktops you powered on this morning have been billing you all day. That is because a virtual desktop is an ordinary cloud machine, and it costs money for every minute it runs, whether or not anyone is signed in. Auto-skilling is the part of your setup that decides how many of those machines are actually running right now, so you stop paying for the quiet hours. The hard part is the settings, because three numbers decide almost everything it does, and a couple of things to note will save you a support ticket. Let's walk through how it actually decides. A virtual desktop isn't a computer under someone's desk so it has no idea whether anyone is using it. It's a virtual machine running in Azure and the meter starts the moment it powers on. Leave it running overnight and you pay for the whole night. The trick is what happens to a machine when nobody needs it. There's a difference between shutting a desktop down inside Windows and deallocating it. Deallocating is the step where Azure takes the compute back and stops charging you for it. Autoscaling is mostly about reaching that second state as often as it safely can. Two words are worth pinning down before we go further because they show up everywhere in this topic. In Azure Virtual Desktop, your desktops live inside a host pool. That's a group of machines sharing the same setup, the same image, the same apps, and the same rules. Each machine inside that group is a session host, and that's the actual desktop a person signs into. A host pool is the team and a session host is one player on it. Before autoscaling existed, you had two options and both of them hurt. You could keep enough machines running around the clock to cover your busiest hour of the week. That means paying for peak demand at two in the morning on a Sunday. Or you could run fewer machines and let people wait for one to free up, which is cheaper and miserable to use. Autoscaling is the third option where the number of running machines moves with demand instead of sitting still. At a handful of desktops, this is a small annoyance. At a few hundred, it's the difference between a bill you can defend to your finance team and one you can't. The waste is quiet because nothing breaks when a machine sits idle. It just keeps costing money. Autoscaling doesn't watch each person and react to them one at a time. It works from a schedule, and the schedule breaks the day into four phases. Ramp up is the start of the day when usage picks up. Peak is the busiest stretch. When the most people are working at once, ramp down is when usage tapers off and that's usually when machines get shut down to save money. Off peak is the quiet stretch when usage is expected to be at its lowest. A scaling plan holds those phases and the plan is what you actually attach to a host pool. You can point one scaling plan at several host pools at once, but each host pool can only carry one plan at a time. So if two teams run on the same rhythm, one plan can cover both of them. Picture a company where most people start at 9 and log off around 5. The plan ends up looking like the shape of that day. Machines come up before 9, stay up through the afternoon, and drop away as the office empties out. The phases aren't locked to a fixed clock, so you set the start and end of each one to match your own building. A plan can also hold more than one schedule, which is how you handle a quieter Friday or a weekend that doesn't run at all. Time zones matter here more than people expect. A scaling plan runs in one time zone. A company spread across several regions needs more than one plan, or it starts machines at the wrong hour for half the staff. When something changes, the system notices. A user signing in or signing out counts as a session change event, and that triggers a fresh look at the host pool. If a lot of people move at once, it batches those checks so it doesn't overload itself. There's also a second way to run this and it's still in preview, so treat it as something to watch rather than something to build on. The basic version powers machines on and off. The preview version can also create machines that don't exist yet and delete them when they're done, which changes the math a little. For now, most environments run the power on and off version. The phases are the when and they tell you what the day should look like. They don't tell you how the system decides to change anything. and that comes down to three numbers you set. Start with the capacity threshold. It's the percentage of used capacity that counts as full enough to add another machine. Then there's the minimum percentage of hosts, which sets a floor on how many machines stay running during a phase. Even when the office is empty, this is how many stay alive. The last of the three is the maximum session limit, which is how many sessions one machine is allowed to carry. Set it to five, and the sixth person lands somewhere else. Use capacity is the one number you don't set because the system works it out. It's how much of your possible capacity is in use right now. That possible capacity is the machines that are on multiplied by the session limit on each one. Here's how the three behave together using an example straight out of Microsoft's documentation. Say a host pool has six machines, a capacity threshold of 30%, a minimum of 30% of hosts, and a session limit of five. At the start of the ramp-up phase, the system rounds 30% of six up to two, so two machines are on. Those two machines can carry 10 sessions in total, so with nobody signed in, and the use capacity is zero. Now, three people signed in, that's 30% of the capacity in use, which lands exactly on the threshold, and at the threshold, the system does nothing at all. A fourth person signs in, use capacity climbs past 30%, and the system powers on a third machine. That extra machine pushes capacity up, a used capacity falls back under the line, and everything settles down again. It's arithmetic against three numbers, not intuition about your users. The system only reacts when used capacity is above or below the threshold. If it sits exactly on the line, nothing moves. So a host pool sitting quietly at its threshold isn't broken, it's just at the line. If you set the threshold low, The system adds machines early and keeps things roomy, which costs more. Set it high and it packs people in tightly before it adds anything, which saves money and risks a slower experience. There's no single correct number, because the right one depends on how your people actually work. One more thing to note is that a host pool needs at least one machine for any of this to work. The system can't start from nothing, so scale-out is the safe half, because turning machines on doesn't hurt anyone. The half that touches real people is turning them off and that's where the settings get interesting. Shutting a machine down isn't the mirror image of starting one because there might be someone on it. A machine only gets powered off when three things line up. Used capacity is below the threshold. The system can turn a machine off without pushing used capacity back above the threshold and the machine has no sessions on it at all. That third condition is where most of the careful design lives. Before a machine is turned off it goes into drain mode which is a simple idea. It stops accepting new logins, the people already on it finish what they're doing, and once the last one leaves, the machine powers down. The rule that comes out of this is worth saying plainly. You don't forcibly log off someone with an active session. There's a subtlety here that surprises almost everyone the first time. A disconnected session still counts as an active session. If someone closes their laptop lid or loses their wireless connection, the system assumes they're coming back and keeps a machine ready for them. A host pool full of disconnected users won't shrink to zero, no matter how quiet it looks. Microsoft's documentation gives the actual calculation for how many machines to keep. You divide the total number of sessions by the maximum session limit multiplied by the capacity threshold, and you round up. Say you have nine disconnected users, a session limit of five, and a threshold of 90%. 5 times 90% is 4.5, 9 divided by 4.5 is 2, so the system keeps two machines running for people who might reconnect. Forced log-off is the exception, and it has a fence around it. You can only force people to sign out during the ramp-down phase, never during off-peak. If the ramp-down window ends before the wait time is up, nobody gets forced out at all and the machines wait until people leave on their own. One small detail is easy to miss. If a machine gets powered on and nobody ever signs into it, the system deallocates it after a period of inactivity. A machine that wakes up by mistake doesn't sit there billing. So the off switch is slower and more careful than the on switch, and that's by design. It's protecting someone's unsaved work. Now let's look at what you actually configure, because the idea and the settings are different animals. The thing you'll usually add first is a pre-stage, You tell the system to start a set number of machines before the workday begins, that way the first wave of people who sign in at 9 get a machine that's already awake. A common recommendation is to have those machines ready 15 to 30 minutes before the day starts, because booting a machine takes real time. Then there's how sessions spread across machines. Breadth First spreads people evenly across every running machine, which keeps performance smooth. Depth-first fills one machine until it hits its session limit and then moves to the next, which is cheaper, because the machines nobody landed on can be shut down sooner. Native Azure Virtual Desktop defaults to breadth-first, so if cost is your priority, this is a setting worth understanding rather than accepting. The other big lever is what triggers a change. A schedule handles the predictable part of the day, and a metric-based trigger handles the surprises, like a spike your schedule didn't predict. Schedules are reliable for work that follows a pattern, Metric triggers respond to things you didn't see coming, but they're slower. Because a machine still has to boot, layering both gives you a steady baseline with a safety net on top. Beyond those three, there's a set of practical controls that make the whole thing livable. You can build one autoscale profile and apply it to new or existing host pools instead of editing each pool by hand. You can exclude specific machines from scaling, which matters when you're patching or testing. You can pause autoscaling entirely for a holiday or a maintenance window. You can turn on automatic repair for machines whose agent goes unhealthy so a broken machine gets restarted or rebuilt without waiting for a ticket. And you can pull a history report that shows what the system did, which is the sort of report that answers a finance question in one page, that reporting matters more than it sounds, a cost view that shows build against potential cost, turns auto-scaling from a belief into a number you can point at. Whichever controls you turn on, the loop isn't finished until you measure. Login times and session responsiveness tell you whether your cost settings are hurting people And utilization trends tell you whether your triggers sit anywhere near reality. One more lever is worth knowing because it catches people out. When a machine is deallocated, its disk stays behind and premium storage keeps costing money even while the machine is off. Some management tools will switch that disk down to cheaper storage while the machine sleeps, then switch it back before it wakes up you safe on storage without anyone noticing. Now let's get into the part that generates the support tickets. Start with the one almost everyone makes. People expect a host pool to reach zero machines after hours. It won't, unless nothing is holding it open. Disconnected sessions count, and a host pool that looks idle in the console can still be holding several of them, each one keeping a machine alive. So you do two extra things. You set the minimum number of hosts to zero for the off-peak phase. You also add a policy that signs out disconnected sessions after a timeout, something like 15 to 30 minutes that timeout has to finish before the ramp-down phase ends, or the machines stay up anyway. Then there's the temptation to set the numbers without thinking about boot time. If your threshold and your floor are both set aggressively, the system gets fast at saving money and slow at serving people. A machine that has to boot when someone clicks is a machine that makes someone wait. The fix is to pre-stage capacity and give the system a buffer so the machines people need. are already awake when the day starts. Force log off is another one people reach for too eagerly. It only works during ramp down, it only fires after the wait time, and it signs out idle, disconnected, and active sessions alike if people haven't left. Switch it on without a warning message and a generous wait, and you'll hear about it. Running two scaling systems at once is a quieter trap. Native autoscaling doesn't coexist with the older automation-based scaling script on the same host pool, It will also override drain mode that you set by hand on a pooled host pool. If you want a machine left alone, the way to protect it is an exclusion tag, not manual drain mode. That one is easy to get wrong because manual drain mode looks like it should work. The quietest one of all is the missing permission. The auto scanning service needs a specific role granted to it and without that role it simply can't start, stop or deallocate anything. Nothing errors loudly. The schedule just doesn't do what you expect. and you go looking for the problem in the wrong place. The way you catch most of them is the same. Turn the settings on in a test host pool first, let the history report run for a full week, and compare what it did against what actually happened. None of these are exotic. They're the normal ways a sensible configuration drifts away from how people actually work. Some of what looks like a mistake is actually a limit, and it's worth knowing where the walls are before you promise anyone a specific outcome. Autoscaling has no concept of a holiday. You can't tell it to ramp down on a specific date, so a quiet day still runs your normal schedule unless you pause it. You can pause it, and that's the answer, but it's a manual step rather than something the system figures out. It doesn't rescue you across regions. If the machines in one region go down, autoscaling won't stand up capacity somewhere else. That disaster recovery plan is yours to build, and autoscaling isn't part of it. It doesn't track availability zones either. If you spread your machines across zones for resilience, The system doesn't know which zone a machine sits in, so scaling may not stay even across them. Personal desktops behave differently from pooled ones, and this trips people up. A personal desktop belongs to one user, so autoscaling will only power it down after that person has signed out, and it can't force them out. If you skip the morning startup for personal desktops, nothing wakes them up, so you either turn on start on connect, or you start them yourself. If you ask for hibernation and the desktop doesn't support it, The system simply leaves it alone rather than failing loudly. Hibernation has its own sharp edge. When a machine resumes from hibernation, the remote desktop agent inside it can fail to re-register. If it doesn't come back within about five minutes, the machine stays unavailable in the pool. Microsoft's own guidance suggests preferring a normal shutdown over hibernation when resume is unstable in your environment. There's also a boundary on where the settings can live. The autoscale configuration has to sit in the same region as the host pool configuration, even though the machines themselves can run somewhere else. That's a design detail, and it catches people out halfway through a rollout. The last limit is a billing one, and it's the one people forget. A deallocated machine isn't a free machine. Its disk is still there, premium storage still builds, and that cost keeps running while the machine sleeps. If you're on Windows 365 instead of Azure Virtual Desktop, whole savings story changes shape. Because cloud PCs are priced per user per month rather than by consumption, you can't power your way to savings on a fixed subscription. Let's bring it back together in a few lines. Autoscaling matches the number of running virtual desktops to demand, so you stop paying for machines nobody is using. A schedule cuts the day into four phases Three numbers drive almost every decision, and turning machines off takes more care than turning them on, because someone might be working. The thing worth remembering is that autoscaling isn't a switch you flip once. It's a schedule you keep matching to the way your people actually work, and that changes over time. So here's a question for you. How much of your own desktop fleet is running right now with nobody signed in? If this made the topic feel less intimidating, subscribe to M365FM to master the tools, and the mindset shaping the future of work.