Build full multi-tier lab environments without extra hardware. Learn how to enable nested virtualization in Microsoft Hyper-V in our latest step-by-step guide.
Modern computing no longer relies solely on physical hardware for experimentation, testing, or learning. Nested virtualization takes virtualization a step further by allowing one virtual machine (VM) to function as a host for other VMs. This layered setup enables the simulation of complex infrastructures entirely in software.
Such capability is essential for lab environments, instructor-led training platforms, and the validation of complex, multi-layer designs, all without investing in additional physical servers.
In this guide, you will learn the step-by-step procedure of how to set up nested virtualization in Hyper-V (running a hypervisor inside a Hyper-V VM).
Prerequisites
Host machine requirements are as follows:
- Windows 10 / 11 Pro, Education, or Enterprise (or Windows Server 2016+)
- Intel CPU with VT-x & EPT or AMD CPU with SVM & RVI
- Virtualization enabled in BIOS/UEFI
- Hyper-V role installed on the host
You can check virtualization support by running:
systeminfo

You will see the Hyper-V Requirements section. It should be present in the output.
Create a Virtual Machine in Hyper-V
Follow the steps below to create a new VM inside Hyper-V:
1. Open Hyper-V Manager on your Windows host machine.

2. Click New and choose Virtual Machine.

3. Open Hyper-V Manager and start the New Virtual Machine wizard.
4. Select Generation 2 for the virtual machine (recommended).

5. Allocate memory to the VM:
- Minimum: 4 GB RAM
- Recommended: 8 GB RAM

6. Create a virtual hard disk using the VHDX format.

7. Choose and attach a supported operating system installation media, such as:
- Windows 10 / Windows 11
- Windows Server 2016 or later
8. Complete the wizard, but do not start the virtual machine yet.
Enable Nested Virtualization
Follow these steps on the host machine to enable nested virtualization.
Step 1: Open PowerShell with administrator privileges
Make sure the virtual machine is powered off. If it is running, stop it using:
Stop-VM "VMName"
Step 2: Expose virtualization extensions
Enable nested virtualization for the VM by exposing virtualization extensions:
Set-VMProcessor -VMName "VMName" -ExposeVirtualizationExtensions $true

In the above command:
- Set-VMProcessor: This PowerShell command is used to modify the processor configuration of a Hyper-V VM.
- VMName: Specifies the target VM on which the processor settings will be applied. Here, in the above “New Virtual Machine”.
- -ExposeVirtualizationExtensions: Allows the guest virtual machine to access the host’s hardware virtualization capabilities.
- $true: A Boolean flag that turns this feature on, enabling nested virtualization within the VM.
Step 3: Increase processor count (optional but recommended)
Set-VMProcessor -VMName "VMName" -Count 4
Configure Networking
Nested virtualization works best with NAT or a Default Switch.
If you plan to run Docker or another hypervisor inside the VM, enable MAC address spoofing:
Set-VMNetworkAdapter -VMName "VMName" -MacAddressSpoofing On
Start the VM and Install Hyper-V Inside It
- Start the virtual machine and sign in to the guest operating system.
- Open Turn Windows features on or off from the Control Panel or Start menu.
- Enable the following options:
- Hyper-V
- Virtual Machine Platform
- Restart the virtual machine to apply the changes.
Verify Nested Virtualization Inside the VM
Inside the guest VM, open PowerShell and run:
systeminfo
You should see:
Hyper-V Requirements: A hypervisor has been detected.
Alternatively, check virtualization support with:
Get-VMHostSupportedVersion

Disable Nested Virtualization
If you no longer need nested virtualization, you can turn it off for a powered-off virtual machine using PowerShell. The following command disables access to virtualization extensions inside the guest VM:
Set-VMProcessor -VMName “VMName” -ExposeVirtualizationExtensions $false

This restores the VM to standard virtualization behavior without nested support.
Conclusion
In this guide, we walked through the process of enabling nested virtualization using Hyper-V. You learned how to prepare a virtual machine, configure the required processor settings, and enable Hyper-V inside the guest operating system.
With nested virtualization in place, you can now build advanced lab environments, test multi-layer virtual setups, and explore virtualization features without relying on additional physical hardware.
Good luck with configuring nested virtualization in your Hyper-V environment