My PC shut down due to low battery while Docker was open and up. I restarted it and tried to reopen Docker and continue working on my project but got this error instead:
Docker Desktop - Unexpected WSL error
An unexpected error occurred while executing a WSL command.
with this error code:
deploying WSL2 distributions
ensuring main distro is deployed: deploying "docker-desktop": importing WSL distro "The operation timed out because a response was not received from the virtual machine or container.
\r\nError code: Wsl/Service/RegisterDistro/CreateVm/HCS_E_CONNECTION_TIMEOUT\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: The operation timed out because a response was not received from the virtual machine or container.
Error code: Wsl/Service/RegisterDistro/CreateVm/HCS_E_CONNECTION_TIMEOUT
: exit status 0xffffffff
checking if isocache exists: CreateFile \\wsl$\docker-desktop-data\isocache\: The network name cannot be found.
I followed the instruction and it didnt’ work. I uninstalled Docker, updated wsl and reinstalled Docker several times. Restarted my PC about a million times. I also uninstalled wsl and reinstalled it with no progress. Docker and wsl are updated to the latest versions. Virtualization is enabled(I checked Task Manager>Performance>CPU). I also ran netsh winsock reset
as administrator and restarted the PC with no change. When I run wsl --unregister docker-desktop
I get
Unregistering.
There is no distribution with the supplied name.
Error code: Wsl/Service/WSL_E_DISTRO_NOT_FOUND
What could be the cause of this?