1

I'm using Windows 11 Home and had installed WSL. Apparently wsl2 uses hyper-v so that's causing problems when I want to run VMs. I'm not sure how to turn hyper-v off though. Since I'm using Home, Hyper-V is not listed in optional features, and the powershell command Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor doesn't work either.

I uninstalled WSL (using instructions from this post) and rebooted, but hyper-v is still running. How do I turn it off so I can use hardware virtualization for my VMs?

nobody
  • 220
  • 1
  • 11
  • 1
    I suspect this question must have been asked here before, but I cannot find anything, so apologies if this is a blatant duplicate. – nobody Mar 12 '22 at 02:54
  • Can you confirm that these 2 methods do not work? https://docs.microsoft.com/en-us/troubleshoot/windows-client/application-management/virtualization-apps-not-work-with-hyper-v and have you tried https://stackoverflow.com/a/35812945/16613644 – Gantendo Mar 12 '22 at 02:55
  • https://superuser.com/a/1615090/1482432 – Gantendo Mar 12 '22 at 03:01
  • 1
    @Gantendo I've seen that Microsoft one. Thing is, the methods given for disabling Hyper-V work for me. In the Control Panel, the Hyper-V feature isn't listed, and through powershell, I get an error along the lines of "Feature not found". I haven't tried the stackoverflow one yet. – nobody Mar 12 '22 at 03:05
  • 1
    @Gantendo The stackoverflow method seems to have worked, thanks a lot! – nobody Mar 12 '22 at 03:08
  • Awesome, I'll turn it in to an answer just in case comments get deleted at some point in the future. – Gantendo Mar 12 '22 at 03:09
  • 1
    [This](https://superuser.com/questions/1443294/docker-toolbox-doesnt-have-vt-x-amd-v-even-if-it-is-enabled/1443390#1443390) seems relevant. Hyper-V cannot actually be enabled on Windows 11 Home. WSL2 does NOT actually require Hyper-V, it requires, `Virtual Machine Platform`. There is a significant difference. One can be enabled on Windows 11 Home the other cannot. Possible duplicate [here](https://superuser.com/questions/668006/) and [here](https://superuser.com/questions/1153470/) – Ramhound Mar 12 '22 at 05:36
  • 1
    @Ramhound I see. Its sort of confusing since [Microsoft states](https://docs.microsoft.com/en-us/windows/wsl/faq#does-wsl-2-use-hyper-v--will-it-be-available-on-windows-10-home-) WSL2 relies on the Hyper-V architecture, but as you say there seems to be some subtle differences between the two. – nobody Mar 12 '22 at 06:17
  • Microsoft specifically indicates, that Virtual Machine Platform is required, not Hyper-V. Hyper-V architecture != the Hyper-V Hypervisor – Ramhound Mar 12 '22 at 07:04
  • 1
    Then it would be more appropriate to call it "Virtual Machine Platform hypervisor". Sure, WSL2 doesn't require the "full" Hyper-V, and its VM doesn't show up in the Hyper-V panel, but it _has to_ use the same hypervisor that Hyper-V uses (which is a small "kernel" that is booted before Windows itself, a lot like Xen), because there can be only one such hypervisor per system, and being able to concurrently use WSL2 and "real" Hyper-V proves that they share the same hypervisor rather than each having their own. – u1686_grawity Mar 12 '22 at 09:33

1 Answers1

1

In an elevated Command Prompt write this :

To disable:

bcdedit /set hypervisorlaunchtype off

To enable:

bcdedit /set hypervisorlaunchtype auto 

(From comments - restart to take effect)

Credit: LukeSkCzEnDeRuPl

Gantendo
  • 4,615
  • 1
  • 18
  • 30