If your computer supports virtualization, then it can be enabled from the UEFI/BIOS settings. However, in the case of a Virtual Machine (VM), you cannot access its BIOS settings. However, one can need to run a VM, an Android application, or a Linux distro inside a VM. So what do you do then? In such an instance, you must enable nested virtualization on a guest operating system. This is our topic for today, and this post gives you a step-by-step guide on how to enable nested virtualization on VMs configured on Microsoft Hyper-V, Oracle VirtualBox, and VMware Workstation on a Windows computer. Note: Enabling nested virtualization for VMWare Workstation and Oracle VirtualBox on operating systems other than Windows is different. In this post, we have only discussed how to enable it if your host computer is running a Windows operating system.
What is Nested Virtualization
Nested virtualization, often referred to as “nested VT-x,” is running a virtualized environment inside a device that is already virtualized. In other words, running a VM inside of another VM. When enabling a nested virtualization environment, you are nesting a hypervisor. A hypervisor is software that runs and manages virtual machines on top of the host computer. The hypervisor running the main virtual machine is considered a “Level 0 (L0)” hypervisor. The hypervisor running inside the VM is referred to as a “Level 1 (L1)” hypervisor. Further nested virtualization would result in a Level 2 (L2) hypervisor, and so on. At this point, most users come to think “How many nested virtualization environments can you run simultaneously?” There is no definitive answer to this at the moment. However, it all depends on your system’s resources. If you have the CPU and the RAM, as well as the storage for it, you can run as many nested hypervisors as you want.
Prerequisites for Nested Virtualization
To enable nested virtualization, the hypervisor needs to support it. Hyper-V first supported nested virtualization in Windows 10/Windows Server 2016. Before that, this technology was not available in the Hyper-V hypervisor. If you are using Oracle VirtualBox, versions 6.1 and above support nested virtualization. Moreover, to be able to run nested virtualization, your processor must be an Intel processor with VT-x and EPT technology, or an AMD EPYC or Ryzen processor. You can verify this information by checking on the OEM website or checking hardware virtualization compatibility from Command Prompt. Once it is confirmed that both your hardware and software are compatible, let us move on to enabling nested virtualization.
How To Enable Nested Virtualization (VT-x) On Hyper-V
Learn how to make a Windows 11 VM on Hyper-V, VirtualBox, and Workstation. If you try installing and running a Hyper-V VM inside a VM, you will encounter an error such as the one in this image:VM ran without nested virtualization To enable nested VT-x on a Hyper-V VM (or any other supported hypervisor), the VM must already be created and must be turned off before performing the steps below. The Hyper-V hypervisor does not give you the option to enable nested virtualization on a VM through the settings menu. Therefore, this needs to be done using the Command Line Interface (CLI). Nested virtualization on that particular VM will now be enabled. You can now confirm this by running a guest OS on top of that VM.VM within VM – nested virtualization enabled In the case you wish to disable nested virtualization, use this cmdlet in PowerShell while the VM is disabled:
How To Enable Nested Virtualization (VT-x) On VMWare WorkStation
Similar to Hyper-V, the WorkStation VM must be already created and powered off to enable nested virtualization. Then, follow these steps to enable nested VT-x: Nested virtualization will now be enabled on the VM. You may now run another guest OS on top of that VM. To disable nested VT-x on the VM, simply shut down the VM, return to the Processor settings page, and uncheck the box.
How To Enable Nested Virtualization (VT-x) On Oracle VirtualBox
According to Oracle, VirtualBox now supports nested virtualization for the supported Intel and AMD processors. We also found the option to enable it from the VirtualBox VMs’ setting page. However, the option was greyed out.Nested virtualization option disabled/grayed out in VirtualBox Upon researching, we came to know that many people ran into this option because apparently, VirtualBox has not yet enabled it for Intel processors (we do not know why). However, there is a workaround for this and you can enable nested virtualization on VMs created in VirtualBox as well. Here is how: Nested VT-x will now be enabled on the selected VM. You can confirm this by opening the VM’s settings again, clicking System, and then clicking the Processor tab, where you shall now be able to check and uncheck the box next to “Enable nested VT-x/AMD-V” to enable or disable nested virtualization.Confirm that nested virtualization on VirtualBox VM is enabled Note that, like Hyper-V, this cmdlet will need to be run for each individual VM that you want to enable nested VT-x on. After running the cmdlet in the steps above, nested virtualization is enabled by default. If you wish to disable it, simply uncheck the box next to “Enable Nest VT-x/AMD-V” on the Processor settings page.
Final Analysis
Virtual machines can be used for different purposes, like performing isolated tests, running special services and tasks, etc. However, if you want to perform virtualization-related tests, then we suggest you perform it on a VM inside another VM. This way, you won’t be putting the parent host computer in harm’s way. Nested virtualization is another great way to use limited resources while achieving more. You can use the same VM, on a physical computer or on the cloud, create multiple VMs on it, and then distribute those VMs to your students/subordinates; all while only using one level 1 VM. Also see:
How To Create A Windows 11 Virtual Machine In Hyper-V, VMWare, And VirtualBoxHow To Enable Virtualization In Windows 11/10Download Windows Virtual Machines (VMWare, Hyper V, VirtualBox, Parallels)How To Enable Hyper-V In Windows 11 (Home & Pro)How To Enable Hyper-V On Windows 10 (Home & Pro)