Azure Windows VM becomes unreachable when starting Docker Desktop (WSL2) — guest hangs/crashes while PowerState remains Running

Muhammad Uzair Saqib 0 Reputation points
2026-09-24T18:58:16.4766667+00:00

Summary

On an Azure Windows Server VM, starting Docker Desktop with the WSL2 backend immediately makes the VM unreachable over RDP. Azure often continues to show PowerState = Running, but TCP 3389 stops responding. The guest appears hung or crash-reboots. This still reproduces after a full OS disk reimage.

Environment

Service: Azure Virtual Machines

Region: Central US

VM size: Standard_E4as_v7

OS: Windows Server (clean image after OS disk reimage)

Access: RDP (public IP, port 3389); also Azure CLI az vm run-command

Interactive user: genesis

Workload: Docker Desktop (WSL2 backend) for a local Docker Compose stack

Steps to reproduce

Create / use a Windows Server VM that supports nested virtualization.

Enable Hyper-V, Virtual Machine Platform, Hypervisor Platform, and WSL. Confirm hypervisor launch type is Auto.

Install Docker Desktop configured for the WSL2 backend (do not use --always-run-service).

Sign in over RDP as an interactive user (genesis).

Start Docker Desktop.

Expected result

Docker Desktop starts, the WSL2 engine comes up, and RDP remains available.

Actual result

Within moments of starting Docker Desktop:

RDP disconnects

Port 3389 stops responding

Azure may still report PowerState = Running

Azure may also show a guest OS crash reboot message similar to: “The Virtual Machine is undergoing a reboot due to a guest OS crash. The local data remains unaffected during this process.”

Recovery requires a same-size VM restart (or start if the VM fully stopped/deallocated). This is not caused by DevTest Lab / auto-shutdown deallocate.

Troubleshooting already performed

Confirmed auto-shutdown / scheduled deallocate is not targeting this VM.

On the previous OS: limited WSL via %UserProfile%\.wslconfig (memory=4GB, processors=2, swap=2GB).

Fully uninstalled Docker Desktop and cleaned leftover Docker paths; disabled/re-enabled WSL and Virtual Machine Platform with reboots.

Clean-reinstalled Docker Desktop without starting it as Local System / from Run Command (SYSTEM start fails for WSL2 with WSL_E_LOCAL_SYSTEM_NOT_SUPPORTED).

Reimaged the OS disk to a clean Windows install; re-enabled Hyper-V / VirtualMachinePlatform / HypervisorPlatform / WSL; reinstalled Docker Desktop.

Starting Docker Desktop as genesis on the reimaged OS still reproduces the hang/crash.

Additional evidence

Pre-reimage Event Log included Hyper-V-related bugchecks such as 0x00020001, plus Kernel-Power / unexpected shutdown events around Docker Desktop / WSL bring-up.

Azure metrics sometimes showed high CPU and availability dropping while PowerState remained Running.

Long az vm run-command scripts during Docker bring-up previously worsened RDP hangs; remote scripts are kept short.

Question

Why does starting Docker Desktop (WSL2 backend) consistently hang or crash-reboot the Windows guest / nested Hyper-V stack on this Azure VM while the control plane still reports Running—even after a clean OS reimage?

Looking for a durable fix or known issue guidance (nested virtualization, Hyper-V, WSL, Docker Desktop, or this VM size/series). Workarounds that actually stick are welcome (for example Hyper-V backend instead of WSL2, alternate install/config).

Summary

On an Azure Windows Server VM, starting Docker Desktop with the WSL2 backend immediately makes the VM unreachable over RDP. Azure often continues to show PowerState = Running, but TCP 3389 stops responding. The guest appears hung or crash-reboots. This still reproduces after a full OS disk reimage.

Environment

Service: Azure Virtual Machines

Region: Central US

VM size: Standard_E4as_v7

OS: Windows Server (clean image after OS disk reimage)

Access: RDP (public IP, port 3389); also Azure CLI az vm run-command

Interactive user: genesis

Workload: Docker Desktop (WSL2 backend) for a local Docker Compose stack

Steps to reproduce

Create / use a Windows Server VM that supports nested virtualization.

Enable Hyper-V, Virtual Machine Platform, Hypervisor Platform, and WSL. Confirm hypervisor launch type is Auto.

Install Docker Desktop configured for the WSL2 backend (do not use --always-run-service).

Sign in over RDP as an interactive user (genesis).

Start Docker Desktop.

Expected result

Docker Desktop starts, the WSL2 engine comes up, and RDP remains available.

Actual result

Within moments of starting Docker Desktop:

RDP disconnects

Port 3389 stops responding

Azure may still report PowerState = Running

Azure may also show a guest OS crash reboot message similar to: “The Virtual Machine is undergoing a reboot due to a guest OS crash. The local data remains unaffected during this process.”

Recovery requires a same-size VM restart (or start if the VM fully stopped/deallocated). This is not caused by DevTest Lab / auto-shutdown deallocate.

Troubleshooting already performed

Confirmed auto-shutdown / scheduled deallocate is not targeting this VM.

On the previous OS: limited WSL via %UserProfile%\.wslconfig (memory=4GB, processors=2, swap=2GB).

Fully uninstalled Docker Desktop and cleaned leftover Docker paths; disabled/re-enabled WSL and Virtual Machine Platform with reboots.

Clean-reinstalled Docker Desktop without starting it as Local System / from Run Command (SYSTEM start fails for WSL2 with WSL_E_LOCAL_SYSTEM_NOT_SUPPORTED).

Reimaged the OS disk to a clean Windows install; re-enabled Hyper-V / VirtualMachinePlatform / HypervisorPlatform / WSL; reinstalled Docker Desktop.

Starting Docker Desktop as genesis on the reimaged OS still reproduces the hang/crash.

Additional evidence

Pre-reimage Event Log included Hyper-V-related bugchecks such as 0x00020001, plus Kernel-Power / unexpected shutdown events around Docker Desktop / WSL bring-up.

Azure metrics sometimes showed high CPU and availability dropping while PowerState remained Running.

Long az vm run-command scripts during Docker bring-up previously worsened RDP hangs; remote scripts are kept short.

Question

Why does starting Docker Desktop (WSL2 backend) consistently hang or crash-reboot the Windows guest / nested Hyper-V stack on this Azure VM while the control plane still reports Running—even after a clean OS reimage?

Looking for a durable fix or known issue guidance (nested virtualization, Hyper-V, WSL, Docker Desktop, or this VM size/series). Workarounds that actually stick are welcome (for example Hyper-V backend instead of WSL2, alternate install/config).

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

1 answer

Sort by: Newest
  1. Allan Solomon Mejia 9,735 Reputation points
    2026-09-24T19:39:22.91+00:00

    Hello @Muhammad Uzair Saqib

    If the VM becomes unreachable only when that application/service starts, first check whether Windows is still running and only RDP is failing, or whether the guest OS itself becomes unresponsive.

    While the issue is occurring, check VM → Help → Boot diagnostics. I recommend Boot Diagnostics for examining the console when a Windows VM becomes unreachable.

    If the screenshot shows Windows is running, try Serial Console. Azure Serial Console provides access to the running guest OS independently of RDP and can help troubleshoot services and RDP failures.

    Also check Resource Health and the VM's Azure Monitor metrics around the failure time, particularly CPU, disk, and network activity.

    Don't redeploy or resize the VM until you've isolated the failure. If stopping/disable-starting that specific application consistently prevents the issue, please provide:

    • the application/service name
    • Windows Server version
    • VM size
    • what Boot Diagnostics shows during the failure
    • whether Serial Console remains responsive
    • the exact RDP error

    That should establish whether this is an application/guest OS resource issue or an Azure networking/RDP issue before making infrastructure changes.

    References:

    Troubleshoot RDP connections to an Azure Windows VM

    Boot diagnostics for Azure VMs

    Azure Serial Console for Windows


    Help make this community better for everyone: If this answer helped or resolved your issue, please accept it or upvote it. If not, share more details in a comment so we can continue the discussion and find the right solution. Thank you.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.