microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.37k stars 816 forks source link

WSL fails to start with HCS_E_HYPERV_NOT_INSTALLED error after Windows 11 in-place upgrade despite hyper-v being on #12165

Open zetadin opened 4 days ago

zetadin commented 4 days ago

Windows Version

Microsoft Windows [Version 10.0.22631.4169]

WSL Version

2.3.24.0

Are you using WSL 1 or WSL 2?

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.

Image

Diagnostic Logs

WslLogs-2024-10-14_12-40-11.zip

github-actions[bot] commented 4 days ago

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:

Closed similar issues:

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

zetadin commented 4 days ago

Other unusual behaviour: trying to use WSL1 still produces the same error.Image