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.
BerndLoehlein
Microsoft
Jul 06, 2022lokeshchouksey This sounds like the virtual machine doesn't have permissions to deallocate itself. Can you run the script in the initial post again to assign proper permissions to the system managed identities?
lokeshchouksey
Jul 11, 2022Copper Contributor
BerndLoehlein yes now machine are deallocating after assigned contributor rights to Service principle.but now there is another problem happening , i can see machines are deallocating but after 2-3 min they are automatically starting and running, is there any thing i have missed or doing wrong ? also i have noticed it is happening only if myself shutting down/logoff/restarting the machine.
it is working only if i leave the machine and machine itself disconnected and logoff via set policy.