Forum Discussion
Windows Virtual Desktop shutdown for inactivity
We are using WVD with single provisioned host pools and single user images. This was by design. We can set auto shutdown for each desktop but we would really like to have the WVD autoshutdown after a period of inactivity and then be deallocated. Is there a solution that can do this? or is Microsoft working on this?
- FortyMegabytesBrass Contributor
I am not a Microsoft guy, just a WVD user. But I think this is functionality that's far down the road at the moment if it's even on the roadmap at all.
You can set up some Azure automation to deallocate based on CPU usage. Check this out:
https://docs.microsoft.com/en-us/azure/automation/automation-solution-vm-management-config#cpuutil
So maybe configure that for your session hosts.
- Joel JankeIron Contributor
FortyMegabytes not sure about shutdown, but startup of a deallocated resource is on the roadmap for Dec2020...https://www.microsoft.com/en-us/microsoft-365/roadmap?featureid=70198
- aandrianovCopper Contributor+ same question
- CMurphyUSABrass Contributor+ same question
Really need a way to autostop personal desktops so we can experience cost savings without full deallocation. We have a lot of devs and people who need personal desktops where a pool will not work.
We have transitioned to WVD and previously used Amazon Workspaces and it has the ability to autostop 'personal' VMs when a user is not active after 'x' number of hours. This puts the Workspace into more of a 'sleep' mode, not necessarily stopped 'deallocated' which ensures no lost work. Also when the Workspace is autostopped, the login to the Workspaces client will auto launch the Workspace.
We found the tool called Azure Starter (https://blog.itprocloud.de/Windows-Virtual-Desktop-Azure-Starter-for-WVD/) but this requires the end user to power it down themselves, there is no automation without the risk of lost work. - Michael0815Copper Contributor
rachterberg - have you found a "AWS-Workspace alike" solution in Azure yet ?
- Seth ZwickerCopper Contributor
Check out these guys at Sepago. They have something called "Smartscale" which is free for 5 machines or under.
https://www.sepago.de/en/
- ljajapurCopper Contributorwe are also on the same boat, is there any progress to this?
- CelDBCopper ContributorScaling plans are in preview, unfortunately they aren't available in the region my host pools are, so haven't been able to test.
However I'm currently doing this by using a PowerShell Function App with a timer function that runs twice hourly. You can query the host pool(s) and machines within, check for ones that have no active sessions, then shut them down. It's not perfect, but neither is AVD.- ljajapurCopper Contributorcan you please share the PowerShell script that you use? or what commands you use to find out the active sessions
- CelDBCopper ContributorSure no problem. I used this and made a few improvements on it.
Credit to Travis Roberts:
https://github.com/tsrob50/WVD-Public/blob/master/StopSH-MultiHostPools.ps1
https://www.youtube.com/watch?v=0PWO3OaZmeQ