docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.85k stars 285 forks source link

Docker Desktop - Unexpected WSL error #14275

Open AnyaJoyWu opened 3 weeks ago

AnyaJoyWu commented 3 weeks ago

Description

Diagnostics ID: CCCDBE95-542A-4D61-9F51-E6417C049870/20240821032954

When I run wsl --install Ubuntu is already installed. Launching Ubuntu... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x8037011e Error: 0x8037011e The host compute system service has disconnected unexpectedly.

Press any key to continue...

Reproduce

Virtualization Settings is enabled Windows Features are enabled: Microsoft-Windows-Subsystem-Linux, VirtualMachinePlatform, Hyper-V, Windows Hypervisor Platform Try to install Ubuntu, failed Install Docker Desktop Start Docker Desktop

Expected behavior

No response

docker version

Docker version 27.1.1, build 6312585

WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.19044.4529

docker info

Docker Desktop - Unexpected WSL error

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 "The host compute system service has disconnected unexpectedly. \r\nError code: Wsl/Service/RegisterDistro/CreateVm/ConfigureGpu/HCS/0x8037011e\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 host compute system service has disconnected unexpectedly. 
Error code: Wsl/Service/RegisterDistro/CreateVm/ConfigureGpu/HCS/0x8037011e
: exit status 0xffffffff
checking if isocache exists: CreateFile \\wsl$\docker-desktop-data\isocache\: The network name cannot be found.

Diagnostics ID

CCCDBE95-542A-4D61-9F51-E6417C049870/20240821032954

Additional Info

No response

DoomerDGR8 commented 3 weeks ago

Related: https://github.com/docker/for-win/issues/14274 https://github.com/docker/for-win/issues/14273

I must also add the same issue but I won't create a new post. Here is my uploaded Diagnostics ID: 545ED031-1D36-4D13-A3BB-69517F6642BB/20240821051108

For me, the Docker Desktop was working fine yesterday. I updated Windows 11 Enterprise as there was a an update due for a reboot and let it shut down. Today, I have wsl errors everywhere. Not sure if the Windows update was responsible for this.

image

image

image

adeherdt-r7 commented 3 weeks ago

Running into the same issue as well on a Windows 11 VM.

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.

Nothing seems to work, even running the command itself that Docker is trying does not remedy the problem.

wsl  --import docker-desktop '<HOME>\AppData\Local\Docker\wsl\main' 'C:\Program Files\Docker\Docker\resources\wsl\wsl-bootstrap.tar' --version 2

Import in progress, this may take a few minutes.....

Double checked the settings mentioned here: https://github.com/microsoft/WSL/issues/8693 And they are enabled inside the VM, and the VM as well allows Hyper-V

quarky42 commented 2 weeks ago

Running into the same issue as well on a Windows 11 VM.

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.

Nothing seems to work, even running the command itself that Docker is trying does not remedy the problem.

wsl  --import docker-desktop '<HOME>\AppData\Local\Docker\wsl\main' 'C:\Program Files\Docker\Docker\resources\wsl\wsl-bootstrap.tar' --version 2

Import in progress, this may take a few minutes.....

Double checked the settings mentioned here: microsoft/WSL#8693 And they are enabled inside the VM, and the VM as well allows Hyper-V

Running "Docker Desktop" as admin everything loads up as expected. Running "Docker Desktop" as the regular user, we get that same error. Seems like a permissions issue. I can see that the admin account has a AppData\Local\Docker\WSL directory that the user account doesn't have.

The user can install other distributions in WSL, so this seems like a permissions issue that Docker itself is causing with the way it is installing the "docker-desktop" distribution for some users and not others. The installer has to be ran with admin privileges, and the user needs to be able to launch the application normally.

adeherdt-r7 commented 2 weeks ago

The user can install other distributions in WSL, so this seems like a permissions issue that Docker itself is causing with the way it is installing the "docker-desktop" distribution for some users and not others. The installer has to be ran with admin privileges, and the user needs to be able to launch the application normally.

Installer was definitely ran with Administrator privileges and fired up normally from the desktop shortcut. User in the VM is also part of the Administrator group.

I noticed the following:

The installation worked afterwards without issue. So either the timeouts were simply too strict and the system was starved of resources to complete, or something with VMWare and the 3D acceleration settings causes some odd behavior.