Docker Desktop - Unexpected WSL error
Description
The error message is the following: `An unexpected error occurred while executing a WSL command.
Either shut down WSL down with wsl --shutdown, and/or reboot your machine. You can also try reinstalling WSL and/or Docker Desktop. If the issue persists, collect diagnostics and submit an issue .
deploying WSL2 distributions ensuring main distro is deployed: deploying "docker-desktop": importing WSL distro "Η υπηρεσία δεν είναι σε θέση να ξεκινήσει διότι είναι απενεργοποιημένη ή δεν υπάρχουν ενεργοποιημένες συσκευές για αυτήν. \r\nError code: Wsl/0x80070422\r\n" output="docker-desktop": exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --import docker-desktop <HOME>\AppData\Local\Docker\wsl\main C:\Program Files\Docker\Docker\resources\wsl\wsl-bootstrap.tar --version 2: Η υπηρεσία δεν είναι σε θέση να ξεκινήσει διότι είναι απενεργοποιημένη ή δεν υπάρχουν ενεργοποιημένες συσκευές για αυτήν. Error code: Wsl/0x80070422 : exit status 0xffffffff checking if isocache exists: CreateFile \wsl$\docker-desktop-data\isocache: The network name cannot be found.`
Reproduce
- Update Docker to 4.34.3 version
- Run Docker Desktop
Expected behavior
Start running Docker Desktop normally.
docker version
Version: 27.2.0
API version: 1.47
Go version: go1.21.13
Git commit: 3ab4256
Built: Tue Aug 27 14:17:17 2024
OS/Arch: windows/amd64
Context: desktop-linux
error during connect: Get "http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.47/version": open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified.
docker info
Client:
Version: 27.2.0
Context: desktop-linux
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.16.2-desktop.1
Path: C:\Program Files\Docker\cli-plugins\docker-buildx.exe
compose: Docker Compose (Docker Inc.)
Version: v2.29.2-desktop.2
Path: C:\Program Files\Docker\cli-plugins\docker-compose.exe
debug: Get a shell into any image or container (Docker Inc.)
Version: 0.0.34
Path: C:\Program Files\Docker\cli-plugins\docker-debug.exe
desktop: Docker Desktop commands (Alpha) (Docker Inc.)
Version: v0.0.15
Path: C:\Program Files\Docker\cli-plugins\docker-desktop.exe
dev: Docker Dev Environments (Docker Inc.)
Version: v0.1.2
Path: C:\Program Files\Docker\cli-plugins\docker-dev.exe
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.25
Path: C:\Program Files\Docker\cli-plugins\docker-extension.exe
feedback: Provide feedback, right in your terminal! (Docker Inc.)
Version: v1.0.5
Path: C:\Program Files\Docker\cli-plugins\docker-feedback.exe
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v1.3.0
Path: C:\Program Files\Docker\cli-plugins\docker-init.exe
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
Version: 0.6.0
Path: C:\Program Files\Docker\cli-plugins\docker-sbom.exe
scout: Docker Scout (Docker Inc.)
Version: v1.13.0
Path: C:\Program Files\Docker\cli-plugins\docker-scout.exe
Server:
ERROR: error during connect: Get "http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.47/info": open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified.
errors pretty printing info
Diagnostics ID
C66285FE-B7CB-4067-B6FA-047A5E51814E/20241015043620
Additional Info
The following error first occurred after I updated docker-desktop to the latest version. I uninstalled it and installed an older version but it seems that the issue remains. Thus the docker version and docker info outputs relate to the 4.34.3 version.
was it after latest windows update?
I thought it was after the latest docker desktop update.
But yesterday I fixed it. I found out that the file ext4.vhdx was deleted. Steps to follow:
- Uninstall everything,
- Clear the directories C:\Users\user\AppData\Local\Docker\wsl, C:\Users\user.docker,
- Install docker again.
After these steps, everything works fine.
@EvanMath by everything you mean docker and wsl
Because I did a lot of tries of uninstall and install, I had all the distributions deleted and installed again but I am not very sure if this was needed as the issue was the lost file.
I thought it was after the latest docker desktop update.
But yesterday I fixed it. I found out that the file ext4.vhdx was deleted. Steps to follow:
- Uninstall everything,
- Clear the directories C:\Users\user\AppData\Local\Docker\wsl, C:\Users\user.docker,
- Install docker again.
After these steps, everything works fine.
Yes. It works basically. But the main problem that after every windows restart the docker crashes again.
I thought it was after the latest docker desktop update. But yesterday I fixed it. I found out that the file ext4.vhdx was deleted. Steps to follow:
- Uninstall everything,
- Clear the directories C:\Users\user\AppData\Local\Docker\wsl, C:\Users\user.docker,
- Install docker again.
After these steps, everything works fine.
Yes. It works basically. But the main problem that after every windows restart the docker crashes again.
so did you find any solution and if you do in future do let us know in this thread.
I thought it was after the latest docker desktop update. But yesterday I fixed it. I found out that the file ext4.vhdx was deleted. Steps to follow:
- Uninstall everything,
- Clear the directories C:\Users\user\AppData\Local\Docker\wsl, C:\Users\user.docker,
- Install docker again.
After these steps, everything works fine.
Yes. It works basically. But the main problem that after every windows restart the docker crashes again.
so did you find any solution and if you do in future do let us know in this thread.
I mean "reinstalling docker" works as a solution, until I restart my OS.
@pantharshit007 I have mentioned my solution above.
@arthanis I don't know why this is happening. For me, it works fine. Did you follow all steps?
@pantharshit007 I have mentioned my solution above.
@arthanis I don't know why this is happening. For me, it works fine. Did you follow all steps?
hey if you are talking about this one
wasn't @arthanis mentioned Yes. It works basically. But the main problem is that after every Windows restart the docker crashes again.
did you experience what he is saying?
and about using your solution its just for the past 1-2 days, I haven't experienced this issue maybe it is solved on its own maybe it is not I am waiting to see
@pantharshit007 No I haven't experienced what he is saying.
Well. I restarted the whole process again and followed your steps.
First of all, I didn't removed the ext4.vhdx, because I didn't find it after removing docker. Then I removed the two folders that you mentioned. After that, I reinstalled docker and it worked well.
And the incomprehensible thing has started after I quitted from docker and I reopened (without OS restart). The unexpected WSL error has appeared again.
So, I totally have no idea what's happening. Docker's version is the latest.
Maybe it could be a solution if I remove everything that you mentioned and install an earlier version?
First of all, I didn't removed the ext4.vhdx, because I didn't find it after removing docker. Then I removed the two folders that you mentioned. After that, I reinstalled docker and it worked well.
You don't need to remove the folders but clear everything inside them. After the installation check again if the file exists.
Maybe it could be a solution if I remove everything that you mentioned and install an earlier version?
I have installed the latest and works fine. No need to install an earlier version I believe.
It all started with that d@mn Microsoft update and now we are left hanging here.
I ran into similar problems, all Windows features were installed, and Docker not being able to start anymore.
Can you check running bcdedit in an administrative powershell that hypervisorlaunchtype is set to Auto?
If not, set it via bcdedit /set hypervisorlaunchtype Auto and reboot the system. Nothing else worked for me, reinstalling and deleting folders, even installing a normal WSL distribution did not work, which gave me the error code 0x80370102 and made me check that boot configuration. Somehow Hyper-V wasn't active anymore (to my surprise), I assume this was some Windows update, that changed it back.
Docker Desktop should check for that too in case the VM feature is not available.
Docker Desktop - Unexpected WSL error
docker info
Client: Version: 27.2.0 Context: desktop-linux Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.16.2-desktop.1 Path: C:\Program Files\Docker\cli-plugins\docker-buildx.exe compose: Docker Compose (Docker Inc.) Version: v2.29.2-desktop.2 Path: C:\Program Files\Docker\cli-plugins\docker-compose.exe debug: Get a shell into any image or container (Docker Inc.) Version: 0.0.34 Path: C:\Program Files\Docker\cli-plugins\docker-debug.exe desktop: Docker Desktop commands (Alpha) (Docker Inc.) Version: v0.0.15 Path: C:\Program Files\Docker\cli-plugins\docker-desktop.exe dev: Docker Dev Environments (Docker Inc.) Version: v0.1.2 Path: C:\Program Files\Docker\cli-plugins\docker-dev.exe extension: Manages Docker extensions (Docker Inc.) Version: v0.2.25 Path: C:\Program Files\Docker\cli-plugins\docker-extension.exe feedback: Provide feedback, right in your terminal! (Docker Inc.) Version: v1.0.5 Path: C:\Program Files\Docker\cli-plugins\docker-feedback.exe init: Creates Docker-related starter files for your project (Docker Inc.) Version: v1.3.0 Path: C:\Program Files\Docker\cli-plugins\docker-init.exe sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.) Version: 0.6.0 Path: C:\Program Files\Docker\cli-plugins\docker-sbom.exe scout: Docker Scout (Docker Inc.) Version: v1.13.0 Path: C:\Program Files\Docker\cli-plugins\docker-scout.exe
Server: ERROR: error during connect: Get "http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.47/info": open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified. errors pretty printing info
I have uninstalled and reinstalled many times .Also the wsl --shutdown, wsl-no-distribution
While opening the Docker Desktop
deploying WSL2 distributions ensuring main distro is deployed: deploying "docker-desktop": importing WSL distro "WSL2 is not supported with your current machine configuration.\r\nPlease enable the "Virtual Machine Platform" optional component and ensure virtualization is enabled in the BIOS.\r\nEnable "Virtual Machine Platform" by running: wsl.exe --install --no-distribution\r\nFor information please visit https://aka.ms/enablevirtualization\r\nError code: Wsl/Service/RegisterDistro/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED\r\n" output="docker-desktop": exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --import docker-desktop <HOME>\AppData\Local\Docker\wsl\main C:\Program Files\Docker\Docker\resources\wsl\wsl-bootstrap.tar --version 2: WSL2 is not supported with your current machine configuration. Please enable the "Virtual Machine Platform" optional component and ensure virtualization is enabled in the BIOS. Enable "Virtual Machine Platform" by running: wsl.exe --install --no-distribution For information please visit https://aka.ms/enablevirtualization Error code: Wsl/Service/RegisterDistro/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED : exit status 0xffffffff checking if isocache exists: CreateFile \wsl$\docker-desktop-data\isocache: The network name cannot be found.
I got issue Docker Desktop - Unexpected WSL error
To ignore this issue. I try to unstick Use the WSL 2 base engine
Then, go to error pop-up -> click Quit -> Restart Docker Desktop -> Start service
After install the service
It work for me!
Thank you @peshin-ai
I enabled WSL in BIOS while booting, and now the Docker service works fine
thanks dude, its worked :)