Forum Discussion
BerndLoehlein
Microsoft
Apr 21, 2021Deallocate VM on user logoff
Recently we've announced the public preview of start VM on connect which will allow your deallocated virtual machines getting started automatically when the assigned user tries to connect. Let us hav...
- Sep 20, 2021
Could you please try to update the custom role used for Start VM on Connect and add Microsoft.Compute/virtualMachines/instanceView/read to it? This should ensure that sessions are removed in the service upon deallocation of the virtual machine.
We've already updated our docs for Start VM on Connect, but could be easily missed by customers already using this feature.
Anonymous2115
Oct 04, 2022Copper Contributor
Hi, I had completed every step you mentioned, but my machine is only stopped not deallocated.Do you know why this is happening?
- DustinVestOct 05, 2022Copper Contributor
I would have a look at this, working very well for me https://github.com/tsrob50/WVD-Public/blob/master/StopSH-MultiHostPools.ps1
TravisRoberts has a really good video, he created the script https://www.ciraltos.com/automatically-start-and-stop-wvd-vms-with-azure-automation/
- Anonymous2115Oct 10, 2022Copper ContributorI choose BerndLoehlein method. Deallocation is working. But the thing is like if 2 users are in the same session host, one of the them shutdown the machine other one's session is also disconnected. He need to reauthenticate to get in to the machine and all the files he have been working will be lost.