Forum Discussion
Dante Nahuel Ciai
Oct 26, 2020Brass Contributor
Classic WVD autoscale modification
Hi,
I have a WVD classic environment and I need to implement the autoscaling feature for it.
I've checked MS documentation and found the Autoscale automation which implements Automation Accounts and Logic apps to run during peak hours, check the amount of sessions and spin more VMs if necessary. Then, during off hours, it shut downs VMs to a minimum.
This is good...but not what I need.
I need the automation to add more VMs when needed, but also to shut down VMs when not, during a 24x7 schedule. I don't want it to shutdown VMs only outside working hours.
I tried to check how to add this functionality but I can't seem to find a way of doing it and I can't find the source code that does it to modify it.
Has anyone have a similar problem?
- Command0rIron Contributor
Dante Nahuel Ciai, no problems there at all
It sounds like you need a virtual machine scale set (an overview here). The trick is, just like the App Services, you can scale-out and scale-in the VMs in the scale sets basing on the scalability rules/metrics. For that, you need to create a scale set and enable autoscale for it. Then, using some Azure CLI + Templates you can define the rules. And finally, creating the rule following the guidelines, do not forget to create the same for scaling the set back in (it doesn't happen automatically).
- Dante Nahuel CiaiBrass Contributor
Command0r Thank you for your answer.
The thing is, I can't seem to find any way of using Scale sets with Classic WVD... is this possible?- TravisRobertsIron Contributor
Dante Nahuel Ciai I wrote a script a while ago that got some good feedback. I have a version for WVD classic and another version for WVD ARM. You can find it here.
https://www.ciraltos.com/automatically-start-and-stop-wvd-vms-with-azure-automation/