Config Server Firewall

How to Enable Nested Virtualization in Hyper-V (Step-by-Step)

Nested virtualization lets you run virtual machines inside another virtual machine on Hyper-V. This is useful if you're testing Hyper-V itself, running WSL2 inside a VM, or building a lab environment without needing extra physical hardware.

By default, nested virtualization is turned off on Hyper-V virtual machines. In this guide, we'll walk through how to check if it's enabled, how to turn it on using PowerShell, and the extra settings you need to configure before it will actually work.

There's no GUI option for this — it has to be done through PowerShell.

Step 1: Open PowerShell as Administrator

Right-click the Start button and select Terminal (Admin). Make sure you're using PowerShell, not Command Prompt.

Step 2: Find Your Virtual Machine Name

Run the following command to get a list of all your virtual machines on Hyper-V:

Get-VM

Find the name of the virtual machine you want to configure — you'll need it for the next steps.

Step 3: Check if Nested Virtualization Is Already Enabled

Run this command to check the current status:

Get-VMProcessor -VMName "YourVMName" | Select-Object ExposeVirtualizationExtensions

Replace YourVMName with your actual virtual machine's name.

If the result shows True, nested virtualization is already enabled, and you can skip to Step 5. If it shows False, it's not enabled yet, and we'll turn it on next.

Step 4: Enable Nested Virtualization

Run this command, again replacing the VM name with your own:

Set-VMProcessor -VMName "YourVMName" -ExposeVirtualizationExtensions $true

If the command runs without any errors, it worked. You can confirm by running the Get-VMProcessor command from Step 3 again — it should now return True.

At this point, nested virtualization is technically enabled, but there's one more setting you need to check before you can actually run VMs inside this VM.

Enable Nested Virtualization in Hyper-V

Step 5: Disable Dynamic Memory

Nested virtualization does not work if Dynamic Memory is enabled on the VM. To check and disable it:

  1. Right-click the VM and select Settings
  2. Go to Memory
  3. Uncheck Enable Dynamic Memory
  4. Click OK to save your settings.

That's it — your Hyper-V virtual machine can now run nested virtual machines.