VMware Communities
vmwaresec_rs
Enthusiast
Enthusiast

VMware Workstation 16.1.2 on Windows 10 21H1 Host unable to run nested virtualization

Hello,

I just got a new computer (Dell XPS 17" with an i9 CPU) and I have virtualization enabled in the BIOS but I am unable to run a Win10 VM guest  with virtualization enabled (WSL 2. Ubuntu running on the guest) when I have WSL 2 running on the host. If I turn off WSL 2 on the host then I can run the guest machine with virtualization enabled. The screenshot below shows the error message that I am getting.

vmwaresec_rs_0-1633214394075.png

It is my understanding the VMware Workstation 15.5 and above supports virtualization enabled on the host (WSL 2 and Credential Guard being the most common scenarios) and virtualization enabled in the Guest. I have had this working before on previous versions of Win10 with WSL 2 running. Did this break in Win10 21H1?

I have searched high and low and have not found the solution. Anybody out there know if this is just plain broken, or what the solution is?

Thanks,

Robert

 

Labels (3)
Reply
0 Kudos
4 Replies
bluefirestorm
Champion
Champion

I don't think nested virtualisation ever worked when Hyper-V/WSL2 was enabled on the Windows 10 20H2 host.

Starting with version 15.5.5
With Hyper-V enabled on the Windows 10 host, the virtual machine monitor (VMM) will be using the Windows Hypervisor APIs (can see this in the vmware.log as Monitor Mode: ULM). This is what allowed Hyper-V on the host to co-exist with running VMware Workstation VMs. But nested VMs capability (the "Virtualized Intel VT-x/EPT o AMD-V/RVI is checked in the VM processor settings) will show the error message that you see.

Without Hyper-V enabled on the Window 10 host, the VMM is the regular ring 0 Intel VT-x (in vmware.log Monitor Mode: CPL0) and nested virtualisation works.

I guess you need to make a choice either

(1) have WSL2 on the host and lose nested VM capability in Workstation VMs, or
(2) disable WSL2/Hyper-V on the host and have nested virtualisation on VMs (which also means you can have WSL2, Docker, etc inside the VMs).

Probably best to go with option (2) especially if you want different VMs requiring nested virtualisation capability (e.g. WSL2, Docker or plain vanilla VM running inside a VM).

Wim-o-weh
Contributor
Contributor

Did you find solution?

Reply
0 Kudos
lilijason
Contributor
Contributor

@bluefirestorm 's response is the answer (sadly)

Another option is to use Hyper-V which lets you have nested virtualization and WSL2, but if you want to stay with VMWare (with full virtualization support), you will need to disable Hyper-V and all Microsoft virtualization options and have VMWare take care of it.

Reply
0 Kudos
vmwaresec_rs
Enthusiast
Enthusiast

Following up on my own post ...

I love WSL2 and had it enabled on my 2021 Dell XPS 17" with an i9 and 64GB of RAM (so plenty of processing power) and had VMware Workstation installed as well. No, you can't do nested virtualization in this scenario but even more important is that I found the performance of virtual machines to be terrible with Linux virtual machines seeming to have the most performance impact.

I have used VMware Workstation since version 2 in 2000 and had never struggled with performance issues before. I think I refused to believe that having WSL2 / HyperV enabled was the issue since it is supposed to be supported. Quote from the VMware Workstation web page:

"Run Workstation virtual machines and containers alongside WSL2 and Hyper-V on Windows"

Given the fact that the feature exists, and the statements made, I thought that the issues were v16 issues (maybe they are) but I finally decided to disable WSL2 / HyperV and have found my VMware Workstation performance to be excellent. No more freezes, no more stuttering, no more massive frustration.

I love having WSL2 running on my host machine but have come to the conclusion that it is currently just not possible to run a system with WSL2 enabled on the host and have good performance in any of the VM's, with Linux VM's seeming to take the biggest hit. Where in the past I would struggle with one Kali Linux VM running with barely acceptable performance, I now can power on VM after VM with excellent performance.

VMware, IMHO, your statement about the ability to run Workstation and WSL2 / HyperV needs to be revised with a caveat that you may / probably will experience significant performance degradation ... and yes, I did disable side channel mitigations.