This error occurs when Docker Desktop on Windows fails to connect to the underlying WSL2 backend. The most common culprits: a distro still running WSL1 instead of WSL2, Hyper-V/Virtual Machine Platform not enabled, a .wslconfig that clamps resources too aggressively, or a WSL process that froze/crashed.

The steps below are ordered from fastest to most thorough — work through them in sequence before considering a full reinstall.

Try First: 4 Commands That Usually Fix It

Open PowerShell (Admin) and run each in order:

# 1. Shut down all WSL, then relaunch Docker Desktop
wsl --shutdown

# 2. Update WSL to the latest version
wsl --update
wsl --status

# 3. Restart the WSL service
Get-Service LxssManager | Restart-Service

# 4. Verify distros are on WSL2 (not WSL1)
wsl --list --verbose

The last command should show every distro — including docker-desktop and docker-desktop-data — with VERSION = 2 and STATE = Running. If these 4 steps don’t resolve it, move to the root-cause section below.

Finding the Root Cause & Fixing It

1. Distro is Still on WSL1

Docker Desktop only runs its engine on WSL2. Migrate the distro:

wsl --set-default-version 2
wsl --set-version Ubuntu-22.04 2

Replace Ubuntu-22.04 with your actual distro name, found from wsl --list --verbose.

2. Hyper-V / Virtual Machine Platform Not Enabled

Enable the two required Windows features:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all

Or go to Control Panel → Turn Windows features on or off, check Virtual Machine Platform, Windows Subsystem for Linux, and Hyper-V (if running Windows Pro). Restart after enabling.

Verify CPU virtualization is enabled in BIOS and the hypervisor is running:

systeminfo | findstr /i "Virtualization"
bcdedit /enum | findstr /i hypervisorlaunchtype

If hypervisorlaunchtype returns Off:

bcdedit /set hypervisorlaunchtype Auto

Restart after running this command.

3. .wslconfig Over-Clamping RAM/CPU

Open C:\Users\<User>\.wslconfig. If it exists, remove or relax the memory / processors limits. In many cases Docker starts right back up after simply deleting this file.

4. Distro on a Non-System Drive or Compressed

WSL only runs reliably when installed on the system drive and not compressed. Right-click the distro’s LocalState folder → Properties → Advanced, and uncheck Compress contents to save disk space.

5. WSL or Docker Desktop Running a Buggy Version

Update both to the latest. If the error only appeared after a recent WSL update, it’s likely a version-specific bug — check Microsoft/WSL GitHub issues before deciding to roll back.

6. Not Running as Admin, or “Use legacy console” Is Enabled

Open Docker Desktop as Administrator. If using Windows Terminal or CMD, disable Use legacy console in the terminal’s Properties.

7. Proxy / Firewall / VPN Blocking Connection

Temporarily disable proxy, or set the HTTP_PROXY / NO_PROXY environment variables correctly. Ensure the firewall allows WSL to access the network. Enterprise VPNs (like Cisco AnyConnect) often break WSL’s network routes — try disabling the VPN to rule this out.

If DNS/Winsock corruption is suspected:

netsh winsock reset

Restart after running this.

8. Conflict with VMware / VirtualBox

Update VirtualBox to ≥ 6.1 or VMware to ≥ 15.5 — these versions support Hyper-V coexistence. If conflict persists, temporarily disable or uninstall the conflicting software while running Docker.

Still Failing? Backup and Do a Clean Reinstall

Always back up critical data before uninstalling.

Backup images/containers:

docker container commit my_container my_backup_image
docker save my_backup_image -o my_backup_image.tar

Backup volumes (use a temporary container to repackage as tar):

docker run --rm -v my_volume:/vol -v C:\backup:/backup ubuntu tar czvf /backup/my_volume.tar /vol

If Docker Desktop won’t open to run the above, back up the VM file directly by copying %LOCALAPPDATA%\Docker\wsl\data\docker_data.vhdx to a safe location.

Uninstall and reinstall WSL:

wsl --unregister Legacy    # if an old WSL1 distro remains, replace "Legacy" with its name
wsl --uninstall
wsl --install -d Ubuntu-22.04
wsl --set-default-version 2

Reinstall Docker Desktop:

  1. Uninstall via Settings → Apps.
  2. Also delete the two folders %APPDATA%\Docker and %LocalAppData%\Docker.
  3. Download the latest from the Docker website and open as Administrator.
  4. If still failing, use Troubleshoot → Reset to factory defaults within Docker Desktop (Note: this wipes all existing containers/images — only do this after completing the backup above).

Restore data: copy the backed-up docker_data.vhdx back to its original location, or reload saved images with docker load -i my_backup_image.tar.

Confirming the Fix

docker run --rm hello-world
wsl --list --verbose
docker info
docker volume ls

Everything is working when: hello-world succeeds, all distros show VERSION 2 and Running, docker info reports Engine as Docker Desktop / OS as Linux, and any important volumes are still present.

Preventing Recurrence

  • Let Docker Desktop and WSL auto-update, or run wsl --update periodically.
  • Avoid setting RAM/CPU limits in .wslconfig too aggressively unless necessary.
  • Back up regularly with wsl --export — don’t wait until something breaks.
  • Avoid running two incompatible virtualization layers simultaneously.
  • Keep Windows Update and CPU drivers (Intel/AMD) fully up to date.

Quick Troubleshooting Flowchart

Error: WSL terminated

       ├─── WSL2/Hyper-V enabled? → No → Enable Virtual Machine Platform + WSL → Restart

       ├─── Distro on WSL2? → No → wsl --set-version 2 → Restart

       ├─── .wslconfig resource limits? → Yes → Remove/Edit → wsl --shutdown

       ├─── Proxy/Firewall/VPN? → Yes → Disable temporarily → Test

       ├─── VMware/VirtualBox conflict? → Yes → Update or disable temporarily

       └─── Still broken? → Backup → Reinstall WSL + Docker Desktop → Restore

Sources: Compiled from official Docker and Microsoft WSL documentation, combined with community fixes (GitHub issues, StackOverflow) confirmed to work.