docker / for-win

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

Docker Desktop - Unexpected WSL error #14437

Open Rulowizard opened 5 days ago

Rulowizard commented 5 days ago

Description

I am trying to start docker desktop and get this error: Docker Desktop - Unexpected WSL error

deploying WSL2 distributions ensuring main distro is deployed: deploying "docker-desktop": importing WSL distro "No se pudo iniciar la operación porque no se instaló una característica requerida. \r\nCódigo de error: Wsl/Service/RegisterDistro/CreateVm/HCS/HCS_E_SERVICE_NOT_AVAILABLE\r\n" output="docker-desktop": exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --import docker-desktop \AppData\Local\Docker\wsl\main C:\Program Files\Docker\Docker\resources\wsl\wsl-bootstrap.tar --version 2: No se pudo iniciar la operación porque no se instaló una característica requerida. Código de error: Wsl/Service/RegisterDistro/CreateVm/HCS/HCS_E_SERVICE_NOT_AVAILABLE : exit status 0xffffffff checking if isocache exists: CreateFile \wsl$\docker-desktop-data\isocache\: The network name cannot be found.

Reproduce

Run docker desktop

Expected behavior

Docker desktop should start

docker version

Client:
 Version:           27.3.1
 API version:       1.47
 Go version:        go1.22.7
 Git commit:        ce12230
 Built:             Fri Sep 20 11:42:27 2024
 OS/Arch:           windows/amd64
 Context:           desktop-linux
request returned Internal Server Error for API route and version http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.47/version, check if the server supports the requested API version

docker info

Client:
 Version:    27.3.1
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  ai: Ask Gordon - Docker Agent (Docker Inc.)
    Version:  v0.1.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-ai.exe
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.18.0-desktop.2
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.30.3-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.37
    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.27
    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.4.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.15.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
ERROR: request returned Internal Server Error for API route and version http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.47/info, check if the server supports the requested API version
errors pretty printing info

Diagnostics ID

26CD155B-6E20-4420-AD70-780BC96CD335/20241120033218

Additional Info

No response

mass-gueye commented 5 days ago

i'm having the same problem here in windows 11

zsr-lukezhang commented 4 days ago

i'm having the same problem here in windows 11

I don't have this in Windows 11 24H2/23H2/22H2, but the same problem in Windows Server 2025.

zsr-lukezhang commented 4 days ago

i'm having the same problem here in windows 11

I don't have this in Windows 11 24H2/23H2/22H2, but the same problem in Windows Server 2025.

Addtionaly, running the command myself didn't work. WSL returned some charactors that didn't seem can be read. Just like: ???????? I think this is because my system language was set to zh-CN. After I changed it to en-US, WSL returned:

The connection with the virtual machine or container was closed.

WSL / Hyoer-V machines or Docker Desktop with Hyper-V doesn't work for me as well.

mass-gueye commented 4 days ago

i have fixed it by using wsl2 by default and restarted the machine

zsr-lukezhang commented 4 days ago

i have fixed it by using wsl2 by default and restarted the machine

but I can't fixed it by doing that...

zsr-lukezhang commented 4 days ago

This is a screenshot It looks like this for me.

zsr-lukezhang commented 4 days ago

The WSL debug console is shown due to this WSL setting Enable debug console. Image