Wsl/Service/RegisterDistro/CreateVm/HCS/ERROR_FILE_NOT_FOUND after latest windows update
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
### Windows Version
Microsoft Windows [Version 10.0.26200.8655]
### WSL Version
2.7.10.0
### Are you using WSL 1 or WSL 2?
- [x] WSL 2
- [ ] WSL 1
### Kernel Version
6.18.33.2-2
### Distro Version
Ubuntu-24.04
### Other Software
Docker Desktop (Windows) Version 4.80.0 (232116)
### Repro Steps
Upon rebooting my machine this morning I get the following error on Docker Desktop which was further verified by checking if wsl was running via terminal arriving at the following error
```@ MINGW64 ~/AppData/Local/Docker/wsl/main
$ wsl -d Ubuntu-24.04
The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/CreateVm/HCS/ERROR_FILE_NOT_FOUND
```
Troubleshooting steps:
- Checked Docker Settings as valid
- Checked that WSL was running successfully <- pointer to problem. It wasn't
- Attempted to run ubuntu via `wsl -d Ubuntu-24.04`
- Checked Virtual Machine Remained Enabled
- Checked Services related to WSL were online (vmcompute, hns, hvhost)
- Checked Hypervisor was launching automatically
- Repaired WSL
- Uninstalled and re-installed from the releases on Github (no change when using 2.7.10.0)
- Checked for rogue .wslconfigs
- Uninstalled completely and installed preview version -> Worked.
- Created a Windows Pro VM and installed WSL, got 2.7.10.0 -> Failed
- Rebuilt Windows Pro VM and installed Preview version 2.9.3.0 -> Worked
- Rebuilt Windows Pro VM and installed Preview version 2.7.8.0 -> Worked
- Compared broken vs valid builds. Besides changes I noticed that 2.7.10.0 is missing the following after install
`C:\Program Files\WSL\system.vhd` & `C:\Program Files\WSL\tools\modules.vhd`
- I installed 2.7.10.0 and copied those files manually, 2.7.10.0 now works again.
In conclusion: Something is likely wrong with the package for 2.7.10.0. Surprised that others aren't hitting that.
### Expected Behavior
Install of WSL 2.7.10.0 should be valid, atomic and stable.
### Actual Behavior
2.7.10.0 is missing the following after install
`C:\Program Files\WSL\system.vhd` & `C:\Program Files\WSL\tools\modules.vhd` which then triggers the errors.
### Diagnostic Logs
_No response_
Contributor guide
Research direction
Start by reproducing the install of WSL 2.7.10.0 and running `wsl -d Ubuntu-24.04`. Compare the installed package contents with working versions, focusing on `C:\Program Files\WSL\system.vhd` and `C:\Program Files\WSL\tools\modules.vhd`. Done means a clean 2.7.10.0 installation contains both files and the distro starts without `ERROR_FILE_NOT_FOUND`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100