docker / for-win

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

Docker Desktop - Unexpected WSL erro #14143

Open andreyabpaiva opened 1 week ago

andreyabpaiva commented 1 week ago

Description

Docker Desktop crashes everytime it tries to start.

Reproduce

  1. Start PC
  2. Run Docker Desktop for Windows
  3. Docker Desktop crashes with error
  4. After a further minute or so it force quits

Expected behavior

Docker for Desktop runs correctly

### docker version
Unable to run due to Docker Desktop crashing

The command 'docker' could not be found in this WSL 2 distro.
We recommend to activate the WSL integration in Docker Desktop settings.

For details about using Docker Desktop with WSL 2, visit:

https://docs.docker.com/go/wsl2/

docker info

### docker info
Docker Desktop version 4.31.1 (153621)
Docker Engine version 26.1.4

Diagnostics ID

62206B58-088A-4FE4-9DB3-691EBFFCF321/20240617214533

Additional Info

Crash message

deploying WSL2 distributions
provisioning docker WSL distros: 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.
andrea-reale commented 1 week ago

Hello there,

it looks like the problem is in the Windows Subsystem for Linux (WSL2), which is failing to start because of some missing elements in the Microsoft Virtual Machine Platform optional components.

You could try to reinstall WSL2, by following Microsoft's docs here.

I've also found a post in this Microsoft community forum, suggesting potential solutions to the problem.

I hope that helps.