WSL: Failed to attach disk 'C:\Program Files\WSL\system.vhd' to WSL2: The system cannot find the file specified.
Windows Version
Microsoft Windows [Version 10.0.22631.3155]
WSL Version
2.1.5.0
Are you using WSL 1 or WSL 2?
- WSL 2
- WSL 1
Kernel Version
No response
Distro Version
Ubuntu 20.04
Other Software
No response
Repro Steps
Try to run WSL
Expected Behavior
WSL runs
Actual Behavior
Failed to attach disk 'C:\Program Files\WSL\system.vhd' to WSL2: The system cannot find the file specified.
Diagnostic Logs
No response
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 13
- Comments: 30 (1 by maintainers)
Solved by rolling back to 2.1.4.0
I upgraded from WSL 2.4.13 to WSL 2.5.7 in Windows 11, by “wsl --update” but encountered the issue: “Failed to attach disk ‘C:\Program Files\WSL\system.vhd’ to WSL2”
Fix Method:
After the repair completes, ‘C:\Program Files\WSL\system.vhd’ will be available.
I had the same issue due to windows updating yesterday. Downgrading to the previous working version works for me as others have suggested, it seems to install the
system.vhdfile appropriately.2.3.26.0->2.3.24.02.3.26.0was released November 10th, 2024 (5 days ago from this post)2.3.25.0as it is tagged as apre-release2.3.24.0as it was released September 27th, 2024 (3 weeks ago from this post)Steps to fix:
1. Find your current version (which isn’t working)
2.3.26.02. Download the most recent working version msi installer file
pre-release3. Run the msi
4. Check your WSL2 distro is working again
2.3.24.0You can download 2.1.4.0 here, run the installer and it will do the job for you.
Very happy with the suggestion of installing 2.1.4 since that instantly brought my WSL back to life, many many thanks.
Very unhappy with this critical bug in a patch version being around for more than two months without being addressed. Most people using WSL will be developers or students that rely on WSL working properly. These situations make me want to buy a Macbook.
That hepled! Almost deleted my wsl. Thanks
I encountered a similar issue with version
2.4.13, and I was able to resolve it by downgrading to version2.4.11.Thank you so much! It works!
Same issue here. Worked by downgrading from
2.4.13to2.4.11AND performing a reboot of the machine.Same problem just happened to me. The trigger seemed to be a restart to install windows updates (sadly my org has set these to be automatic, so they sometimes happen without sufficient warning) while WSL was running. I’m not sure if WSL itself was updated by this but it was definitely broken afterwards.
The WSL version after the reboot (in the broken state) was 2.4.12.0, and reinstalling 2.4.11.0 seemed to recover the disk. I suspect it’s not any particular upgrade/downgrade that fixes it, just forcing a reinstall (and running the same-version MSI does not reinstall).
So the real bug is that there are conditions that apparently corrupt/delete that disk. I’d be considerably more livid if this could also occur to the actual distribution disk, but at least in this case it appeared to be safe.
There is no change in behavior between these two versions so I suspect there is some kind of latent issue with upgrade. Looks identical to https://github.com/microsoft/WSL/issues/11069.
@OneBlue - can you take a look?
Can you please tell me how you roll back? Same issue here and I have been struggling the full day to solve this.