WSL cannot be started: Failed to attach disk 'F:\vhds\Ubuntu-24.04\ext4.vhdx' to WSL2: Access is denied. Error code: Wsl/Service/CreateInstance/MountDisk/HCS/E_ACCESSDENIED
- 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.7985]
### WSL Version
2.5.9.0
### Are you using WSL 1 or WSL 2?
- [x] WSL 2
- [ ] WSL 1
### Kernel Version
Ubuntu-24.04
### Distro Version
Ubuntu-24.04
### Other Software
_No response_
### Repro Steps
I terminated the WSL session with `wsl --shutdown`. when I tried to restart it with WSL I get the following error
```
Failed to attach disk 'F:\vhds\Ubuntu-24.04\ext4.vhdx' to WSL2: Access is denied.
Error code: Wsl/Service/CreateInstance/MountDisk/HCS/E_ACCESSDENIED
```
### Expected Behavior
after shutdown, WSL should start as expected
### Actual Behavior
I terminated the WSL session with `wsl --shutdown`. when I tried to restart it with WSL I get the following error
```
Failed to attach disk 'F:\vhds\Ubuntu-24.04\ext4.vhdx' to WSL2: Access is denied.
Error code: Wsl/Service/CreateInstance/MountDisk/HCS/E_ACCESSDENIED
```
### Diagnostic Logs
[WslLogs-2026-03-26_09-21-25.zip](https://github.com/user-attachments/files/26283880/WslLogs-2026-03-26_09-21-25.zip)
Contributor guide
Research direction
Start with the attached WslLogs-2026-03-26_09-21-25.zip and reproduce the failure by running `wsl --shutdown`, then starting the Ubuntu-24.04 distribution. Trace the disk-attach failure for `F:\vhds\Ubuntu-24.04\ext4.vhdx`; done means identifying the cause of E_ACCESSDENIED and documenting or implementing a verified fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, ubuntu
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100