WSL2. Can no longer find 'C:\Program Files\WSL\system.vhd'
Windows Version
10.0.22621.3007
WSL Version
2.0.14.0
Are you using WSL 1 or WSL 2?
- [X] WSL 2
- [ ] WSL 1
Kernel Version
No response
Distro Version
Debian
Other Software
No response
Repro Steps
Try to open console or try wsl --export
Expected Behavior
For it to work
Actual Behavior
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
[process exited with code 4294967295 (0xffffffff)] You can now close this terminal with Ctrl+D, or press Enter to restart.
Diagnostic Logs
No response
Hi I'm an AI powered bot that finds similar issues based off the issue title.
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. Thank you!
Open similar issues:
- Can't access WSL2 directory. Have VHDX instead of folder after moving (#6123), similarity score: 0.77
- WSL2 - "The Windows Subsystem for Linux instance has terminated." (#5110), similarity score: 0.75
Closed similar issues:
- [WSL2 - Ubuntu] System's root directory does not exist... (#4328), similarity score: 0.74
- A file named "C:\Program" prevents WSL from starting (#10637), similarity score: 0.74
- Unable to start WSL2 (#9171), similarity score: 0.74
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Same here after installed v2.1.1.0
me too.
PS C:\Users\alfta> wsl --version
WSL バージョン: 2.0.14.0
カーネル バージョン: 5.15.133.1-1
WSLg バージョン: 1.0.59
MSRDC バージョン: 1.2.4677
Direct3D バージョン: 1.611.1-81528511
DXCore バージョン: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows バージョン: 10.0.22631.3085
PS C:\Users\alfta> wsl --update
更新プログラムを確認しています。
Linux 用 Windows サブシステムの最新バージョンは既にインストールされています。
PS C:\Users\alfta>
I just reinstalled WSL2 in the end, after first copying the vhdx in my AppData to a safe location, just in case. My original distro was untouched by the reinstallation and worked as expected.
mee too
I reinstalled also and worked...
This is unfortunately a known issue when upgrading from an older version. The way to solve this is to manually download and install the new version.
You can find the latest MSI there: https://github.com/microsoft/WSL/releases/tag/2.1.1
I have to say though, that it worked fine for a couple of days after the upgrade. Then the vhd suddenly 'disappeared overnight'. Nevertheless, I will give this a go if it happens again.
@OneBlue Thank you! Confirmed this fixed the issue for me. Saved me a bunch of time, because every other thread seemed to recognize unmounting and re-installing which would have took a ton of time for me to re-setup my workspaces.
Same thing as @simonlaszcz, I updated wsl everything worked fine, next day I get this error.
I was also using 2.0.14 and lost two days in a row the Ubuntu distro. Now I give a try with the latest version 2.1.1.
Error message in wsl 2.0.14:
Failed to attach disk 'C:\Program Files\WSL\system.vhd' to WSL2: Das System kann die angegebene Datei nicht finden.
Error code: Wsl/Service/CreateInstance/CreateVm/MountVhd/HCS/ERROR_FILE_NOT_FOUND
this helped, thanks. But absolutely confusing as an 'known issue' this is nowhere to be seen
Thanks @OneBlue! Upgrading to v2.1.3 fixed this issue.
This is unfortunately a known issue when upgrading from an older version. The way to solve this is to manually download and install the new version.
You can find the latest MSI there: https://github.com/microsoft/WSL/releases/tag/2.1.1
You saved my file! Thank you!
Same behavior here.
I update WSL2 on Friday with wsl --update.
It worked until I rebooted today, and now I have the same error.
Reinstalling wsl.2.1.5.0.x64.msi does not fix the issue ! I never got the feedback that it was successfully installed, but there was also no error...
I then went to look into the msi archive a extracted the systemd.vhd file as system.vhd. and now it seems to work.
But this is really not a user friendly process :-(
@jtognazzi: Can you share logs of the installation of 2.1.5.0 if that doesn't solve the issue ?
You can collect them via msiexec /i
@OneBlue
Should I try to reinstall the msi package via your cmd ?
So this is what I did:
msiexec.exe /i wsl.2.1.5.0.x64.msi /L*V C:\Securiton\wsllogs.txt
and I attached the resulting logs...
wsllogs.txt
I couldn't initiate my old vhdx disk eventually, but I handled to move all my precious data to another subsystem by mounting the disk via wsl --mount ext4.vhdx --vhd command.
https://learn.microsoft.com/en-us/windows/wsl/wsl2-mount-disk
Same behavior here. I update WSL2 on Friday with
wsl --update. It worked until I rebooted today, and now I have the same error.Reinstalling wsl.2.1.5.0.x64.msi does not fix the issue ! I never got the feedback that it was successfully installed, but there was also no error...
I then went to look into the msi archive a extracted the systemd.vhd file as system.vhd. and now it seems to work.
But this is really not a user friendly process :-(
Exact same issue here. The proposed solution also worked -
for extracting the system.vhd file from the msi installer I ran
msiexec /a c:\tmp\wsl.2.1.5.0.x64.msi /qb TARGETDIR=c:\tmp\wsl
The file is then at the following location
c:\tmp\wsl\system.vhd
from there just copy it to C:\Program Files\WSL\system.vhd
I also have same error.
(base) PS C:\Users\11487> wsl --version
WSL 版本: 2.2.4.0
内核版本: 5.15.153.1-2
WSLg 版本: 1.0.61
MSRDC 版本: 1.2.5326
Direct3D 版本: 1.611.1-81528511
DXCore 版本: 10.0.26091.1-240325-1447.ge-release
Windows 版本: 10.0.22631.3737
I copy from my colleague PC same file to my PC with same version, then it can launch. system.vhd is rootfs for OS.
Same behavior here. I update WSL2 on Friday with
wsl --update. It worked until I rebooted today, and now I have the same error.Reinstalling wsl.2.1.5.0.x64.msi does not fix the issue ! I never got the feedback that it was successfully installed, but there was also no error...
I then went to look into the msi archive a extracted the systemd.vhd file as system.vhd. and now it seems to work.
But this is really not a user friendly process :-(
Perfect, it works for me! Actually, I extracted the systemd.vhd from latest msi archive and renamed it to system.vhd, and it works well. But I cannot extract this file directly to folder C://Program Files/WSL, it pops up a window indicating permission deny, so I extract it to other folder and then copy to C://Program Files/WSL.