amalkabraham001
Posted on July 22, 2023
Microsoft had released public preview for AVD auto scaling feature for Personal desktops. This is a real game changer as many customers leverage personal or dedicated desktops and need to control the cost of the deployments.
Enabling auto scale provides the ability to admins to control cost and energy by shutting down instances which are in disconnected and logged off state. You need to ensure that you configure Idle and disconnect timers to make the auto scaling works as expected.
Let us see how can we configure auto scaling for personal desktop hostpools. As part of the auto scaling, we will be configuring Ramp up and Ramp down settings and also what to do during peak hours and off peak hours.
Pre-requisites for creating auto scaling settings
- You must grant Azure Virtual Desktop access to manage the power state of your session host VMs. In short, the Azure virtual desktop service principal' need to be given 'Desktop Virtualization Power On Off Contributor' permissions. During the creation phase, the below error will occur if the permissions where not given.
The permissions looks like below
- You must create the scaling plan in the same Azure region as the host pool you assign it to. You can't assign a scaling plan in one Azure region to a host pool in another Azure region.
Configuring the auto scaling settings.
To configure auto scale settings, navigate to Azure portal-->Azure virtual desktop-->Scaling plans as shown in the below picture.
Click "+Create" and the auto scaling page will load.
In the basics settings, provide the basic details like RG, Name, Region etc.
Select the time zone in which the auto scaling need to trigger.
Also select the host pool type as "Personal".
Ensure to give exclusion tags if needed. This will prevent auto scaling to applied on the specific VDIs where the tags are applied.
Create auto scale schedules
In the schedules tab, select "+Add schedule". The Add schedule page will popup. In the general tab, provide the Time zone to be followed for the auto scale. This should match the time zone given in the auto scale configuration to avoid issues. Provide the schedule name and in the repeat on select the number of days where the auto scaling policy will be applied.
In my example, I am creating two auto scaling policies, one for weekdays and the other for weekends. The weekend auto scaling schedule will be a more aggressive one.
Click on Next and in the Ramp up plan, select the below as per your requirement.
Click Next, In the peak hour settings, provide the start of peak hours and what to do during the peak hours of business.
Provide the ramp down settings, this allows the settings to enable the ramping down of the session hosts.
Lastly configure the off peak hour settings and click on Add.
Follow the same schedule creation steps to create the schedule for weekends.
Once done, click next. In the "host pool assignments" select the personal host pools where you need to apply this settings.You can select multiple host pools to get the auto scaling settings.
Click Next to add the tags and Click next.
Click on Create to create the auto scaling plan for personal desktops.
The key difference between Ramp up and peak hour is, let us assume that your business starts by 7 AM, so you keep your VMs ready by turning them ON for users to connect starting from 7AM and when the peak hours starts at 8AM so that the VMs are fully up and running for the staffs to connect instantaneously.
Click on review and Create to initiate the creation of the auto scaling policy.
The auto scaling policy will create successfully once the role is properly assigned.
Hope this is useful to you, please let me know if you have any questions or queries.
Posted on July 22, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.