Azure Virtual Desktop (AVD) | Scaling plans
Just notice that I have a new tab under my AVD Portal for Scaling Plan.
Before I just explore it, I checked Microsoft DOCs to understand the new feature and see how I can enable it, but I didn't find any relevant info even when I google it I end up with the same result... did I stop here.. Absolutely not, created a temp host pool and followed the wizard to enable and configure the new feature and here is my test result
AVD Scaling plans
Autoscaling is a demanded feature and has been waiting for so long, we used to automatically scale host sessions using PowerShell scripts and Azure Automation, but it was long and complicated procedures involving a lot of components, Now with AVD Scaling plans you can define ramp-up hours, peak hours, ramp-down hours, and off-peak hours for weekdays and specify autoscaling triggers. but you can only add one schedule per day and a Scaling plan must include an associated schedule for at least one day of the week.
Requirements
Create a Custom RBAC role
Click on JSON Tab
Click on Edit Tab
Past the following JSON template
"properties": {
"roleName": "Autoscale",
"description": "Friendly description.",
"assignableScopes": [
"/subscriptions/<SubscriptionID>"
],
"permissions": [
{
"actions": [
"Microsoft.Insights/eventtypes/values/read",
"Microsoft.Compute/virtualMachines/deallocate/action",
"Microsoft.Compute/virtualMachines/restart/action",
"Microsoft.Compute/virtualMachines/powerOff/action",
"Microsoft.Compute/virtualMachines/start/action",
"Microsoft.Compute/virtualMachines/read",
"Microsoft.DesktopVirtualization/hostpools/read",
"Microsoft.DesktopVirtualization/hostpools/write",
"Microsoft.DesktopVirtualization/hostpools/sessionhosts/read",
"Microsoft.DesktopVirtualization/hostpools/sessionhosts/write",
"Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/delete",
"Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/read", "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/sendMessage/action",
"Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/read"
],
"notActions": [],
"dataActions": [],
"notDataActions": []
}
]
}
}{
Change <SubscriptionID> with your SubscriptionID
Save the template
Click Review + Create.
Last, Click Create.
Assign the custom role to Windows Virtual Desktop App:
Recommended by LinkedIn
Next, Click on Select members
In the search bar, enter and select Windows Virtual Desktop, as shown in the following screenshot.
Last, Click Review + Assign.
Create a scaling plan
As usual, we have to select Subscription, Resource Group, Name, and Location for the new resource.
Time Zone is important as the whole Autoscaling activity will be triggered and executed to Start/Stop host sessions based on the time zone you select here.
As you can see the below step is almost the same as the previous one, so just to clarify the difference:
Peak hours and Ramp-up:
Usually, every application has its own peak hours where concurrent users tend to increase slowly before the start of peak time. same for AVD users start getting in slowing to the host sessions and at a specific time most of the users will start hitting the services (this is the peak hour)
Then Create..
In the next step, we have to assign the host pool that we will apply this schedule on, scaling plan can be assigned to any number of host pools.
Review and Create..
Technical lead
2yMahmoud A. ATALLAH can this be used for session host created using shared gallery and being generalized one!! If not, I am wondering how can this be useful for large deployments..
CTO |Chief Geek |Security,Data,AI |Azure MVP |MCT |Author |PetrolHead
3yDavid Cox Mitchell Gee Helenna Mannila Jason (MR AVD)Pisani
Cloud Solution Architect
3yGreat article. Thanks again Mahmoud
EUC & VDI Architect
3yI wonder where you can specify the pool's session capacity without enforcing a hard limit? Did I miss it somewhere?
Cloud Infrastructure | Cloud Engeneer | Cloud Architect
3yEduardo Mecking Wesley Prado