microsoft / microsoft/WSL

WSL2 fails HCS_E_HYPERV_NOT_INSTALLED on Windows 11 25H2 26200.9457 although HypervisorPresent=True; HCS fails with ERROR_INVALID_HANDLE in capabilityhelpers.cpp

Open
#41,635 6 comments 0 reactions 0 assignees View on GitHub
emailed-logs hypervisor-platform
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

### Windows Version
Windows 11 Home 25H2
OS Build 26200.9457

### CPU
AMD Ryzen 7 7840HS

### WSL Version
2.7.14.0

### Problem

WSL2 cannot create any VM/distro.

`wsl --install Ubuntu` fails with:

Wsl/InstallDistro/Service/RegisterDistro/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED

Error code:
0x80370102

### Hypervisor status

The Windows hypervisor is definitely running:

systeminfo:
Hyper-V Requirements:
A hypervisor has been detected.

(Get-CimInstance Win32_ComputerSystem).HypervisorPresent
True

VirtualizationFirmwareEnabled
True

VBS:
Running

bcdedit:
hypervisorlaunchtype Auto

### Required Windows components

VirtualMachinePlatform: Enabled
HypervisorPlatform: Enabled
Microsoft-Windows-Subsystem-Linux: Enabled

Services:

vmcompute: Running
wslservice: Running
hvservice: Running

### Other virtualization software

VirtualBox 7.2.10 was installed.

VBoxSup.sys was previously running, but was explicitly disabled and the system was rebooted.

WSL failure remains unchanged with VBoxSup disabled.

### Important additional finding

`hcsdiag hostproperties processortopology`

returns:

0x8000FFFF (E_UNEXPECTED / catastrophic failure)

`hcsdiag hostproperties cpugroup`

returns no CPU groups but exits with code 0.

### ETL findings

The attached WSL ETL trace shows that the first concrete failure inside vmcompute occurs here:

onecore\vm\compute\management\shared\compute\capabilityhelpers.cpp(258)

Error:
0x80070006
ERROR_INVALID_HANDLE

The same error is then propagated through:

src\windows\common\hcs.cpp(109)
wslservice.exe

After that vmcompute reports:

vmcommonhelpers.cpp(226)
0x80370102

CallContext:
[HcsRpc_CreateSystem\ComputeSystemManager_Create\VirtualMachine_Construct]

Finally HCS reports:

Cannot create system since Hyper-V is not installed on the host.

This appears to be a secondary/mapped error, because the earlier failure is ERROR_INVALID_HANDLE inside vmcompute capability handling.

### Expected behavior

WSL2 should create the utility VM successfully.

### What has already been tried

- BIOS virtualization verified enabled
- VirtualMachinePlatform enabled
- HypervisorPlatform enabled
- WSL enabled
- hypervisorlaunchtype Auto
- multiple reboots
- DISM /Online /Cleanup-Image /RestoreHealth
- sfc /scannow
- netsh winsock reset
- VBoxSup disabled + reboot
- WSL reinstall/update attempts

The Windows hypervisor is currently detected and running, but HCS fails when creating the VM.

### Question

What does ERROR_INVALID_HANDLE in
vmcompute.exe!capabilityhelpers.cpp(258)
indicate in this context?

Why does HCS report HCS_E_HYPERV_NOT_INSTALLED when HypervisorPresent=True and the hypervisor is demonstrably running?

Could this be a Windows 11 25H2 / 26200.x HCS regression or servicing/component issue?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing VM creation with `wsl --install Ubuntu` and reviewing the attached ETL around `capabilityhelpers.cpp(258)`, `hcs.cpp(109)`, and `vmcommonhelpers.cpp(226)`. Compare the `hcsdiag hostproperties processortopology` and `cpugroup` results with the failure; done means identifying whether the failure is a 25H2 servicing/component regression or another host configuration issue and documenting evidence for the next fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.