Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WSL Failed to Initialize on Windows 11

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).

like image 276
Reverie Metherlance Avatar asked Dec 13 '25 06:12

Reverie Metherlance


2 Answers

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.

like image 109
Akshay Tayade Avatar answered Dec 14 '25 19:12

Akshay Tayade


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

like image 31
hanoo Avatar answered Dec 14 '25 19:12

hanoo