WSL fails to start with HCS_E_HYPERV_NOT_INSTALLED error after Windows 11 in-place upgrade despite hyper-v being on
Windows Version
Microsoft 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 20.04
Other Software
CPU: AMD Ryzen 7-7700X with AMD SVM enabled
Repro Steps
Windows 11 cumulative update for 23H2 was failing repeatedly. Out of the possible solutions on the windows support forums the only way to install it that worked was to do an in-place upgrade (with the windows installation iso labelled as 24H2 from https://www.microsoft.com/en-us/software-download/windows11). Following the in-place upgrade windows features related to WSL appear twice in the Windows Features dialog and were all disabled.
Despite being disabled, running wsl.exe was possible, but produced:
WSL2 is not supported with your current machine configuration. Please enable the "Virtual Machine Platform" optional component and ensure virtualization is enabled in the BIOS. Enable "Virtual Machine Platform" by running: wsl.exe --install --no-distribution For information please visit https://aka.ms/enablevirtualization Error code: Wsl/Service/CreateInstance/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED
'wsl.exe --install --no-distribution' said that wsl was already installed.
After enabling the Virtual Machine Platform, Windows Hypervisor Platform, and Windows Subsystem for Linux features, the same error persists.
Note: before the in-place upgrade wsl was also refusing to start but with a different error. Exact error is no longer available but it was something about the handle is invalid and error code 0x80070006. Here are the logs for it: WslLogs-2024-10-13_14-45-44.zip. Considering that windows updates have previously broken wsl functionality for me, I thought that installing the update could resolve the issue. It just got worse :)
Expected Behavior
WSL is able to start when hyper-v platform is enabled.
Actual Behavior
WSL2 is not supported with your current machine configuration. Please enable the "Virtual Machine Platform" optional component and ensure virtualization is enabled in the BIOS. Enable "Virtual Machine Platform" by running: wsl.exe --install --no-distribution For information please visit https://aka.ms/enablevirtualization Error code: Wsl/Service/CreateInstance/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED
This is despite Virtual Machine Platform, Windows Hypervisor Platform, and Windows Subsystem for Linux features now being turned on.
Diagnostic Logs
View similar issues
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!
Open similar issues:
- Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureGpu/HCS/0x80041001 (#10917), similarity score: 0.78
- WSL not working after windows update (#10185), similarity score: 0.77
- Error code: Wsl/Service/CreateInstance/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED (#10332), similarity score: 0.77
Closed similar issues:
- Cannot start even though hardware virt is enabled (#8107), similarity score: 0.80
- WSL2 fails to run with error 0x80370102 (#8065), similarity score: 0.79
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Diagnostic information
Multiple log files found, using: https://github.com/user-attachments/files/17366630/WslLogs-2024-10-13_14-45-44.zip
.wslconfig found
Detected appx version: 2.3.24.0
Detected user visible error: Wsl/Service/CreateInstance/CreateVm/HCS/0x80070006
Other unusual behaviour: trying to use WSL1 still produces the same error.
Any updates on this?
My solution back in October was to do a clean install of Windows 11 and then turn on WSL.