WSL2: VHD file vanished after Windows 11 restart
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
### Windows Version
10.0.22631.4169
### WSL Version
2.3.24.0
### Are you using WSL 1 or WSL 2?
- [X] WSL 2
- [ ] WSL 1
### Kernel Version
5.15.153.1-2
### Distro Version
ubuntu 24.04
### Other Software
Docker desktop is installed as well with WSL support.
### Repro Steps
Start WSL in cmd: `wsl`
### Expected Behavior
My default Ubuntu distribution should start.
### Actual Behavior
Failed to attach disk 'C:\Program Files\WSL\system.vhd' to WSL2
Error code: Wsl/Service/CreateInstance/CreateVm/MountVhd/HCS/ERROR_FILE_NOT_FOUND
It happened after a Windows restart 1 hour ago. I don't see any updates from Windows Update in the log for today.
Could someone tell if I can recover my VMs from this event, or even how to freshly restart a new Ubuntu VM? For now, even if I try `wsl install `, I get the same error `vhd file not found`.
### Diagnostic Logs
_No response_
Contributor guide
Research direction
Start by reproducing `wsl` on Windows 11 with WSL 2 and inspect the reported `C:\Program Files\WSL\system.vhd` path. Compare the failure with the listed WSL, kernel, Ubuntu, and Docker Desktop versions. Done means determining whether the existing VMs can be recovered or whether a fresh Ubuntu installation can start.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, ubuntu
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100