Azure Virtual Desktop - Auto scaling, turning off VMs during unassigned days

Nazeer, Shalomon 125 Reputation points
2025-11-17T17:43:15.8366667+00:00

This is the first time we are enabling autoscaling on a host pool to test the autoscaling feature in Azure Virtual Desktop. We have created a schedule targeting Wednesday, Thursday, and Friday, and the details are provided below.

However, as soon as the scaling plan was enabled, we noticed that VMs started shutting down and moving to a deallocated state, despite the targeted days being Wednesday, Thursday, and Friday.

We need to understand why the auto scaling feature is turning down VMs on Monday and Tuesday.

User's image

User's image

Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Jilakara Hemalatha 6,055 Reputation points Microsoft External Staff Moderator
    2025-11-17T18:45:24.5433333+00:00

    Hi Nazeer, Shalomon,

    Thank you for reaching out Q/A. Based on the details you have shared that your host VMs shut down on Monday and Tuesday immediately after enabling the scaling plan, even though your autoscaling schedule targets only Wednesday, Thursday, and Friday.

    This behavior is expected with Azure Virtual Desktop (AVD) autoscaling and is related to how the service interprets days that do not have a schedule assigned.

    When a scaling plan is active, Azure evaluates the host pool every day. On days where no schedule is configured (Monday and Tuesday) —the autoscaling engine treats those days as non-operational. As a result, it applies the default ramp-down behavior, which reduces session host capacity to zero for cost optimization. This causes any VMs without active user sessions to move into the Stopped (Deallocated) state.

    To avoid hosts shutting down on days outside your defined schedule, you would need to assign a minimal schedule for those days or disable the scaling plan when autoscaling is not required. Adding a simple schedule for Monday and Tuesday ensures the scaling engine maintains the minimum number of hosts you specify, preventing unexpected deallocation.

    Reference: https://v4.hkg1.meaqua.org/en-us/azure/virtual-desktop/autoscale-create-assign-scaling-plan?tabs=portal%2Cintune&pivots=power-management

    Hope this helps! Please let me know if you have any queries.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Nazeer, Shalomon 125 Reputation points
    2025-11-21T03:05:22.1566667+00:00

    Hi @Jilakara Hemalatha

    Thanks for clarifying. We have one more use case: there is a patching schedule for a list of machines, split across the 2nd, 3rd, and 4th weekends. These machines need to be in a powered ON state during the patching activity.

    Our question is: if we set an exclusion tag using PowerShell or AZ CLI on a machine that is currently in a deallocated state (because of autoscale schedule), will the VM automatically start once the exclusion tag is applied? Or do we need to manually power on the VM even after setting the exclusion tag?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.