WSL Failed to Initialize on Windows 11
Asked Answered
G

2

12

I installed Docker on a clean laptop with the official Windows 11 with the latest update. Pre-installed WSL2 for Windows 11 according to Microsoft documentation. When running docker, the "docker starting..." is infinite. Attaching the error log. Error sending starting WSL engine:

Docker.Core.HttpBadResponseException: {"message":"2 errors occurred:\n\t* provisioning docker WSL distros: unregistering WSL distro "docker-desktop": unregistering WSL "docker-desktop": winapi error #2147746562\n\t* checking if isocache exists: CreateFile \\wsl$\docker-desktop-data\isocache\: The network name cannot be found.\n\n"}

I tried to reinstall WSL and Docker. Deleted %appdata%/docker. For the test, I tried to install the Ubuntu subsystem through the Microsoft store. She didn't work either. Most likely a problem with the WSL. Tried to disable and enable again Windows features (WSL Support and Virtual Machine feature).

Gauguin answered 18/1, 2023 at 10:39 Comment(0)
N
17

I had the same error solved it by: https://github.com/docker/for-win/issues/7039

Don't need to reinstall it.

Open windows shell as Administrator and run:

wsl --unregister docker-desktop

Then go to services, stop Docker Desktop service, then start it again.

Nickola answered 31/1, 2023 at 19:46 Comment(2)
a thousand thank yous to you, sir! may you live a long and happy life.Hostility
Save my day - working solution for Windows 11 Version 10.0.22631 Build 22631 and Docker v4.33.1Noise
W
1

The solution for me was: Windows Security -> App & Browser Control -> Exploit Protection Settings change Control Flow Guard (CFG) to "On" for both:

C:\Windows\System32\vmwp.exe C:\Windows\System32\vmcompute.exe

Woodland answered 26/6 at 21:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.