Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Desktop - Unexpected WSL error #14148

Open
Biswadeepgiri opened this issue Jun 20, 2024 · 2 comments
Open

Docker Desktop - Unexpected WSL error #14148

Biswadeepgiri opened this issue Jun 20, 2024 · 2 comments

Comments

@Biswadeepgiri
Copy link

Description

After installing Docker Desktop for windows and updating the wsl to the latest version , when I am trying to run docker desktop then it is showing me "Unexpected WSL error" and force exits.

Reproduce

Install Docker Desktop for windows
Running Docker desktop with admin priviledge

Expected behavior

The docker desktop should run fine without the docker engine being stopped.

docker version

Client:
 Cloud integration: v1.0.35+desktop.13
 Version:           26.1.1
 API version:       1.45
 Go version:        go1.21.9
 Git commit:        4cf5afa
 Built:             Tue Apr 30 11:48:43 2024
 OS/Arch:           windows/amd64
 Context:           default

docker info

Client:
 Version:    26.1.4
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.1-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.27.1-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.32
    Path:     C:\Program Files\Docker\cli-plugins\docker-debug.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.24
    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.2.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.9.3
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
ERROR: error during connect: Get "http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.45/info": open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified.
errors pretty printing info

Diagnostics ID

268D4788-4B78-45FB-ACAA-304CE8080685/20240620031605

Additional Info

This is the error log:

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 \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.

@jflam
Copy link

jflam commented Jun 21, 2024

I'm seeing the same issue on a new Copilot+ PC (Yoga Slim 7X). Diagnostics ID below.

04DBD12A-C1AF-44C2-82CD-CEAAA750E0A0/20240621053230

Running the command in the diagnostics in the window shows:

PS C:\Users\jlam> wsl -d docker-desktop -u root -e wsl-bootstrap version
<3>WSL (9) ERROR: CreateProcessParseCommon:711: Failed to translate C:\Users\jlam
<3>WSL (9) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\PowerShell\7
<3>WSL (9) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Windows\system32
<3>WSL (9) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Windows
<3>WSL (9) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Windows\System32\Wbem
<3>WSL (9) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Windows\System32\WindowsPowerShell\v1.0\
<3>WSL (9) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Windows\System32\OpenSSH\
<3>WSL (9) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\PowerShell\7\
<3>WSL (9) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\Docker\Docker\resources\bin
<3>WSL (9) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\jlam\AppData\Local\Microsoft\WindowsApps
<3>WSL (9) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\jlam\AppData\Local\Programs\Microsoft VS Code\bin
Processing fstab with mount -a failed.
Failed to mount C:\, see dmesg for more details.

<3>WSL (9) ERROR: CreateProcessEntryCommon:505: execvpe wsl-bootstrap failed 8
<3>WSL (9) ERROR: CreateProcessEntryCommon:508: Create process not expected to return

@andrea-reale
Copy link

Hi,

from the error code Wsl/Service/RegisterDistro/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED, it looks to me WSL2 got in some state where it does not find the required Microsoft HyperV virtualization components.

Looking around, I have found this Microsoft community forum where some workarounds are suggeted:
https://learn.microsoft.com/en-us/answers/questions/1336873/how-to-solve-wsl-service-createinstance-createvm-h

The last two suggestions especially caught my attention.

Could you please let us know if they helped?

Thanks,
Andrea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants