9

I'm not able to Start any VMs in VirtualBox and getting this error:

Cannot enable nested VT-x/AMD-V without nested-paging and unrestricted guest execution! (VERR_CPUM_INVALID_HWVIRT_CONFIG).

I reinstalled latest VirtualBox and was same issue still exist.

Note that recently I did WSL2 installation by the following this official documentations so I thought the problem should be related to this installation, and decided to rollback some steps (not Uninstall WSL2 itself) to verify;

After all I found that "Step3: Enable Virtual MachinePlatform feature" was causing this problem:

Before installing WSL 2, you must enable the Virtual Machine Platform optional feature.

Open PowerShell as Administrator and run:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Restart your machine to complete the WSL install and update to WSL 2.

So I removed this feature and VM Start problem resolved, but after that WSL2 doesn't start now.

Now I'm stuck here what to do, I need both WSL & VMs to working while they are not happy with that feature to Disable or Enable for both.


OS: Windows-10 1909 (Build 18363.1139)

5
  • So far as I know at this point, WSL is not a full fledged Linux operating system. If you really need nested Virtual Machines (I never have in some years of using virtual machines, try VMware Workstation Pro which does support nesting. Alternatively use multiple Virtual Machines to support your needs. I do the latter.
    – anon
    Commented Oct 15, 2020 at 14:21
  • If you don’t really require WSL 2 you could also use WSL 1. You can freely convert a distribution between the two.
    – Daniel B
    Commented Oct 15, 2020 at 15:57
  • 2
    Seems like this has been fixed - a combination of Microsoft providing a paravirtualization API and VirtualBox using it. Also VMWare Workstation too.
    – davidbak
    Commented Feb 6, 2021 at 4:34
  • @davidbak I have tried to start a VM on VBox when WSL2 is installed, now it's can start but it gets stuck at blank black screen with a rapid cursor blinking; per this post seems they are working on a solution but sounds problem is not fully resolved yet. (OS: Win10 v20H2 b19042) Commented Feb 7, 2021 at 16:51
  • Ahhh, nothing is ever as simple as the official documentation makes it seem ...
    – davidbak
    Commented Feb 7, 2021 at 16:59

1 Answer 1

8

Update 2021-10-05: Now both WSL2 and VMs works fine on VirtualBox v6.1.26 r145957 (Qt5.6.2)/OS: Windows10 v20H2 b19042

Note 2021-11-22: If you decide to upgrade VirtualBox, noting that it doesn't work in v6.1.28 and it required to install Windows11.


Found that WSL2 is using Hyper-V technology for Linux Virtualization and to working WSL2 which enabling "Virtual Machine Platform" enables the Hyper-V, so it cause conflict with level-2 hypervisors like VirtualBox and unable to start VMs successfully.

by running this command in cmd (Run as Administrator) you could get the current value:

bcdedit.exe /enum {current} | find "hypervisorlaunchtype"

and to disable it either remove "Virtual Machine Platform" in Windows Optional-Features, or run this command:

dism.exe /online /disable-feature /featurename:VirtualMachinePlatform /all /norestart

or with this to disable the Hyper-V:

bcdedit.exe /set hypervisorlaunchtype off

Note: there is no way currently to have both VirtualBox and WSL2 working at the same time when Hyper-V is enabled, so by disabling Hyper-V, you will not able to open WSL2.

17
  • Also, to point out.. this is nothing but Microsoft's fault. The driver Microsoft is using for virtualization (for Hyper-v) doesn't play well with other dirvers. VirtualBox / VMWare provide proof of this. Commented Oct 15, 2020 at 16:37
  • Thanks for the update -- Microsoft and Oracle added nested virtualization support for this to work. Just a note that I believe this will currently only work with Intel CPUs. Those using AMD will likely need Windows 11, although I haven't had a chance to double-check if the feature (AMD nested virtualization support) made the final cut yet. I did hear that it had some issues in a recent build. Commented Oct 5, 2021 at 18:24
  • 1
    Ah I guess it must be the version then... they must've changed something in more recent versions. Be careful if you upgrade ;) thanks!
    – user541686
    Commented Nov 22, 2021 at 5:31
  • 1
    @user541686 yes, version 6.1.30 works too, and yes, nested paging is disabled and to enable it we still need to disable HyperV again. Commented Jan 21, 2022 at 16:09
  • 1
    @αғsнιη: Ah, thanks for reporting back. Yeah. Doesn't sound like we'll be able to get fast Hyper-V working on Windows 10 with VirtualBox.
    – user541686
    Commented Jan 22, 2022 at 1:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .