Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to switch to WSL2. Error code: Wsl/Service/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED #11384

Open
1 of 2 tasks
ghoebenreich opened this issue Mar 27, 2024 · 16 comments
Open
1 of 2 tasks

Comments

@ghoebenreich
Copy link

ghoebenreich commented Mar 27, 2024

Windows Version

Microsoft Windows [Version 10.0.22621.3155]

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.146.1-2

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

I have WSL1 running for the Linux Ubuntu 22.04 with name ubuntu

Executing wsl --set-version ubuntu 2 issues the error:
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion in progress, this may take a few minutes.
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/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED

I enabled the "Virtual Machine Platform". I also disabled it /Reboot/ enabled /reboot. No matter what I do I always get the same error. I checked the BIOS and I have VT-x and all other Virtualization options enabled in the BIOS.

wsl.exe --install --no-distribution :

The operation completed successfully.

I'm running this on: Dell Precision 7560 with CPU 11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz / Intel64 Family 6 Model 141 Stepping 1, GenuineIntel. No
My CPU supports SLAT.

bcdedit /enum | findstr -i hypervisorlaunchtype
shows
hypervisorlaunchtype Auto

Not sure what settings I still have to check. I captured the WSL logs
WslLogs-2024-03-27_11-10-14.zip

Would be great if someone can tell me what's still wrong.

Expected Behavior

wsl --set-version ubuntu 2

should give a positive result and switch ubuntu to WSL version 2.

Actual Behavior

I enabled the "Virtual Machine Platform". I also disabled it /Reboot/ enabled /reboot. No matter what I do I always get the same error. I checked the BIOS and I have VT-x and all other Virtualization options enabled in the BIOS.

wsl.exe --install --no-distribution :

The operation completed successfully.

I'm running this on: Dell Precision 7560 with CPU 11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz / Intel64 Family 6 Model 141 Stepping 1, GenuineIntel. No
My CPU supports SLAT.

bcdedit /enum | findstr -i hypervisorlaunchtype
shows
hypervisorlaunchtype Auto

Not sure what settings I still have to check. I captured the WSL logs
WslLogs-2024-03-27_11-10-14.zip

Would be great if someone can tell me what's still wrong.
I looked at similar issues like Issue 10332 but it did not solve my issue

Diagnostic Logs

No response

Copy link

Diagnostic information
Detected appx version: 2.1.5.0
Detected user visible error: Wsl/Service/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 27, 2024

Thank you @ghoebenreich. From the logs, everything looks good so I wonder if you have another hypervisor installed ? Maybe VirtualBox or vmware ?

@ghoebenreich
Copy link
Author

ghoebenreich commented Apr 2, 2024

HI @OneBlue, I previously had virtualbox installed and docker for windows, but I removed/deinstalled both, I'm running this on bare-metal laptop. How do I check what hypervisor is installed, are there some registry entries to check? I also tried to use the hyper-v installation, but I removed it too (deselected Hyper-V on "Tun Windows features on or off" Tab, since I thought I need it for the WSL2, but according to the documentation only "Virtual Machine Platform" is needed which is installed. Any ideas? Any help is much appreciated.

@OneBlue
Copy link
Collaborator

OneBlue commented Apr 2, 2024

Thank you @ghoebenreich. Let's try one thing: Can you run bcdedit /set hypervisorlaunchtype on as elevated, reboot and see if that solves the issue ?

@ghoebenreich
Copy link
Author

@OneBlue I only can set it to auto or off, when I set the bcdedit /set hypervisorlaunchtype on I get

PS C:\Windows\System32> bcdedit /set hypervisorlaunchtype bool on
The integer data is not valid as specified.
Run "bcdedit /?" for command line assistance.
The parameter is incorrect.

@benhillis
Copy link
Member

@ghoebenreich - did you try auto?

@ghoebenreich
Copy link
Author

@benhillis I had hypervioslaunchtype always set to auto. I tried to off and auto it again, no change.

@ghoebenreich
Copy link
Author

ghoebenreich commented Apr 11, 2024

@OneBlue , @benhillis does anybody has some more ideas. Since nothing worked for WSL2, I installed Hyper-V from the windows components. Downloaded Ubuntu 22, but also was not able to start. It tells me a Hyper-V component is not running. Maybe this has something to do with it, that some registry setting or permission setting is blocking something for hyper-v as well.

@onomatopellan
Copy link

In an elevated PowerShell if you run systeminfo what it says at the last part, the "Hyper-V Requirements:"?

@ghoebenreich
Copy link
Author

@onomatopellan :

Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed.

@onomatopellan
Copy link

That's correct. Your Windows session is running under the hypervisor. I guess you already tried everything but do you perhaps have Memory integrity disabled? If so enable it and restart the computer.

Also I'd try to enable Windows Sandbox feature:

Optional Windows Features dlg

If you can run it we can discard any Hyper-v issue and point definitely to WSL2.

@ghoebenreich
Copy link
Author

ghoebenreich commented Apr 24, 2024

@onomatopellan Sorry for the late response. I checked the memory integrity. It tells me that there is an incompatible driver installed, but does not list the driver and refuses to enable it :(. Maybe that's one of my core issues. Thanks for the hint. I will try to enable Windows Sandbox and report back.

@HO-COOH
Copy link

HO-COOH commented May 25, 2024

None of the method above works for me, not even Windows Sandbox. And I clearly remembered my docker worked before

image

@ghoebenreich
Copy link
Author

ghoebenreich commented Jun 27, 2024

@onomatopellan I was able get it working finally. Not exactly sure how, but I did the following. I went back to the BIOS and unchecked anything which is related to HyperV support. Booted again and verified with the systeminfo that I don't have a Hyper V. I worked for sometime without changing that. Had some reboots. After a week of working I switched on one setting after the other again, without reinstalling any Windows features. To my surprise I was able to call wsl --default-version 2 and my Ubuntu container got updated to use wsl2. Since that it seems to work:

image

Note: I tried to activate the Memory integrity, before and after this without any success. I still get a deny which says I have an incompatible driver installed, but windows is unable to list which it always says 0, which is a pain, but fortunately I don't depend on the Memory integrity.

Thanks for the help I got.

@zulis
Copy link

zulis commented Sep 18, 2024

I was getting the same error:
Error code: Wsl/Service/CreateInstance/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED
But the issue was that I've disabled Core Isolation -> Memory integrity. After setting it back to On problem was solved.

@TrumX
Copy link

TrumX commented Nov 27, 2024

I was getting the same error: Error code: Wsl/Service/CreateInstance/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED But the issue was that I've disabled Core Isolation -> Memory integrity. After setting it back to On problem was solved.

just wanted to say I had similar errors, disabled core isolation was the problem too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants