WSL icon indicating copy to clipboard operation
WSL copied to clipboard

wsl2 fail to startup with Wsl/Service/CreateInstance/CreateVm/HCS/ERROR_FILE_NOT_FOUND

Open oXoSh opened this issue 1 year ago • 7 comments

Windows Version

Microsoft Windows [版本 10.0.26100.2894]

WSL Version

2.4.10.0

Are you using WSL 1 or WSL 2?

  • [x] WSL 2
  • [ ] WSL 1

Kernel Version

5.15.167.4

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

start wsl

Expected Behavior

enter wsl shell

Actual Behavior

Wsl/Service/CreateInstance/CreateVm/HCS/ERROR_FILE_NOT_FOUND (forget to save whole terminal output, sorry)

Diagnostic Logs

WslLogs-2025-02-08_19-56-00.zip

oXoSh avatar Feb 08 '25 12:02 oXoSh

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Diagnostic information
Detected appx version: 2.4.10.0
Detected user visible error: Wsl/Service/CreateInstance/CreateVm/HCS/ERROR_FILE_NOT_FOUND

github-actions[bot] avatar Feb 08 '25 12:02 github-actions[bot]

I tried "disable 'Virtual Machine Platform' -- reboot -- enable that option again", but didn't work.

Later I tried "winget uninstall --id Microsoft.WSL" then install https://github.com/microsoft/WSL/releases/tag/2.4.8. It can enter wsl shell.

oXoSh avatar Feb 08 '25 12:02 oXoSh

Thank you @oXoSh. This issue should be fixed in the next release.

In the meantime, you can work around the issue by manually creating a C:\Windows\System32\lxss\lib folder.

OneBlue avatar Feb 11 '25 22:02 OneBlue

This should be fixed with https://github.com/microsoft/WSL/releases/tag/2.4.11.

benhillis avatar Feb 12 '25 22:02 benhillis

Issue still occuring in 2.4.11.0:

Failed to attach disk 'C:\Program Files\WSL\system.vhd' to WSL2: The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/CreateVm/MountVhd/HCS/ERROR_FILE_NOT_FOUND

Rolling back to 2.4.8 as @oXoSh said here worked!

jcary741 avatar Feb 15 '25 18:02 jcary741

I just upgradede wsl with wsl --upgrade and now I cannot start any of my vms. They all error: The system cannot find the file specified. Error code: Wsl/Service/CreateInstance/CreateVm/HCS/ERROR_FILE_NOT_FOUND

wsl --version WSL version: 2.7.10.0 Kernel version: 6.18.33.2-2 WSLg version: 1.0.73.2 MSRDC version: 1.2.6676 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.26200.8655

bme-cgm avatar Jul 03 '26 12:07 bme-cgm

This fixed it for me: https://github.com/microsoft/WSL/issues/40488#issuecomment-4706460260

The link in the comment is for version 2.7.8.0. I used the installer for 2.7.10.0, which you can find here: https://github.com/microsoft/WSL/releases#release-2.7.10

dyedwiper avatar Jul 08 '26 08:07 dyedwiper