question

CommaxxDemo-5399 avatar image
0 Votes"
CommaxxDemo-5399 asked AmitaMenon-3691 edited

WVD Restarts

Hello! One of my VM (out of 8) restarts all the time
I take it down with "Start / Shuit Down" insiide the os and then stop it from the Azure console. It get´s "Stopped and decommisoned"
After 3-4 minutes it restarts
Not one single line in the machines Event Viewer about why?

What to do? I dont want to delete and rebuild the machine but I cant afford to have it running 24/7

azure-virtual-desktop
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

whoward-msft avatar image
1 Vote"
whoward-msft answered

Firstly, you shouldn't shutdown your Azure VMs from inside the OS, doing so doesn't inform the underlying HyperV Host your intent and it will simply reboot the VM. You should shutdown your VM through the Azure Portal and then it should say Stopped (deallocated). Because the host doesn't know if the shutdown was "expected" it reboots the VM.

Secondly if your concerned about cost savings you could save money by using Azure Scheduler or an Auto-Start Automation script to start and stop the VM according to a schedule. For more see this doc: https://docs.microsoft.com/en-us/azure/automation/automation-solution-vm-management

Lastly use the Activity Log in the Azure Portal to view the latest status and behavior history of your VM. This will keep you informed on the VM state.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DavidSchrag-2162 avatar image
0 Votes"
DavidSchrag-2162 answered DavidSchrag-2162 edited

@whoward-msft Is this advice still accurate and can you expand on the difference between shutting down through the OS vs. stopping in the portal? In my experience, I can shut down a WVD Win10 multi-session VM while logged in as a local admin, and it will eventually go into the Stopped state in the portal. But it can take quite a long time -- up to ten minutes in some cases. If I stop it in the portal it takes less time, and it will go into the full "Stopped (deallocated)" state, but I wonder if that is the same as doing a clean shutdown through the OS. I thought perhaps it was something closer to the equivalent of killing the power. Maybe it tries a clean shutdown first but then forces it down if the OS is unresponsive? I couldn't easily find documentation for this. Thanks.

EDIT: I should clarify that it can take quite a long time for the VM to appear as Stopped in the portal. Once the shutdown command is issued through the OS, I lose connectivity to the machine and I can't see what's happening. So it's possible that the shutdown happens rapidly but the status does not get updated in the portal for several minutes.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.