Nested virtualization lets a Hyper-V virtual machine run its own hypervisor — so you can install Hyper-V inside a VM and run more VMs in there. It sounds like a party trick, but it’s genuinely useful: building a multi-node lab on one laptop, testing a clustered setup without a rack of hardware, or running Windows Sandbox, WSL 2, or a container host inside a VM you can snapshot and throw away.
The feature is one PowerShell command at its core. What trips people up is everything around it — the requirements that have to be met first, and two networking and memory gotchas that leave the inner VMs broken if you don’t handle them.
This covers the requirements, the exact commands, and the fixes for the problems you’ll hit on a first attempt. Steps apply to Windows 11 Pro/Enterprise and Windows Server 2016 and later.
What nested virtualization actually does
Normally Hyper-V keeps the CPU’s hardware virtualization extensions (Intel VT-x, AMD-V) to itself. A guest VM doesn’t see them, so it can’t run a hypervisor of its own — try to install Hyper-V inside a normal VM and the role install fails because the processor “doesn’t support virtualization.”
When you enable nested virtualization, the host passes those extensions through to the chosen VM. Now that VM can install Hyper-V and run guests of its own. Per Microsoft’s documentation, the host exposes the hardware virtualization extensions to its virtual machine, and the nested guest can then run its own VMs.
Where nested virtualization earns its place
| Labs and training | Build a whole multi-VM environment inside one VM you can checkpoint and reset |
|---|---|
| Testing clusters | Stand up a Failover Cluster or a Proxmox/ESXi lab without extra physical hosts |
| Dev features | Run WSL 2, Windows Sandbox, or Docker Desktop inside a VM |
| Isolation | Keep an experimental hypervisor sandboxed from the real host |
Requirements before you start
Most failures happen because one of these wasn’t true. Check them first.
Nested virtualization prerequisites
- Host runs Windows Server 2016+ or Windows 10/11 (Pro or Enterprise)
- A compatible CPU — Intel with VT-x and EPT, or a supported AMD processor on recent builds
- The guest VM also runs an OS that supports being a Hyper-V host (Server 2016+ / Win 10/11)
- Generation 2 VM with a VHDX is recommended for the parent
- Enough RAM assigned to the parent VM for both it and its nested guests
- The parent VM is powered off before you enable the feature
Step 1: Enable virtualization extensions on the VM
This is the command that does the work. Run it on the host, against the powered-off VM you want to turn into a nested hypervisor.
# On the HOST — VM must be OFF
Stop-VM -Name "Lab-Host01"
Set-VMProcessor -VMName "Lab-Host01" -ExposeVirtualizationExtensions $true
Verify it took:
Get-VMProcessor -VMName "Lab-Host01" | Select-Object Name, ExposeVirtualizationExtensions
You want ExposeVirtualizationExtensions : True. That’s the toggle that lets the guest see the
CPU’s virtualization features.
Step 2: Fix memory — turn off dynamic memory
A VM that’s acting as a hypervisor can’t have its memory changed while it’s running, and dynamic memory works by adjusting RAM on the fly. So dynamic memory and a nested host don’t mix. Give the parent a fixed amount of startup memory and disable dynamic memory before you boot it as a host.
# Disable dynamic memory and set a fixed amount
Set-VMMemory -VMName "Lab-Host01" -DynamicMemoryEnabled $false -StartupBytes 8GB
Step 3: Fix networking — MAC address spoofing
Here’s the other classic stumble. The VMs running inside your nested host each get their own MAC address. The parent VM’s network adapter, by default, drops traffic from any MAC other than its own — so the inner VMs send packets and nothing comes back.
The fix is to allow MAC address spoofing on the parent VM’s adapter, so it passes the inner VMs’ traffic through:
# Let the parent VM forward traffic for the nested VMs' MAC addresses
Set-VMNetworkAdapter -VMName "Lab-Host01" -MacAddressSpoofing On
If you’d rather not enable MAC spoofing — for instance on a host where the network team forbids it — the alternative is to set up NAT networking inside the parent VM, so the inner VMs sit behind a NAT and present only the parent’s MAC to the outside. Either approach works; MAC spoofing is simpler for a lab. The same connectivity principles apply as in any Hyper-V setup, and if a VM ends up offline the usual suspects are covered in why a Hyper-V VM has no internet.
Step 4: Install Hyper-V inside the VM
Now boot the parent VM and install the Hyper-V role inside it, exactly as you would on a physical machine.
On a Windows Server guest:
# Run INSIDE the parent VM (Lab-Host01)
Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart
On a Windows 11 guest, enable it through the optional feature:
# Run INSIDE the parent VM (Windows 11)
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
After the reboot, open Hyper-V Manager inside the VM and you’ll be able to create and run nested VMs. If the role install still complains that the processor doesn’t support virtualization, go back to Step 1 — the extensions weren’t exposed, or the VM wasn’t fully powered off (a saved state doesn’t count) when you ran the command.
What you give up with nested virtualization
Turning a VM into a nested host changes what you can do with that VM. A few features become unavailable or unreliable while extensions are exposed and inner VMs are running:
Trade-offs while a VM is a nested host
| Dynamic memory | Can't adjust the running host's RAM — use fixed memory |
|---|---|
| Live migration of the running VM | Not supported while it's actively running as a hypervisor |
| Some runtime memory operations | Runtime memory resize is blocked on the nested host |
| Checkpoints | Behavior is limited while extensions are exposed — test before relying on them |
| Performance | Nested guests run slower than VMs on the physical host — expect overhead |
None of these matter much for a lab, which is what nested virtualization is mostly for. They do matter if you were hoping to use it for production-style workloads — it isn’t built for that. Treat nested virtualization as a testing and learning tool, not a way to stack production hypervisors.
Quick troubleshooting
If something’s not working, walk these in order:
- Role install fails inside the VM (“processor doesn’t support virtualization”). Extensions
weren’t exposed. Confirm
ExposeVirtualizationExtensionsisTrueand that the VM was fully off (not saved/paused) when you set it. - Nested VMs won’t start or behave oddly. Dynamic memory is probably still on. Disable it and set fixed startup RAM on the parent.
- Nested VMs have no network. MAC address spoofing isn’t enabled on the parent’s adapter, or you need NAT inside the parent. Turn on MAC spoofing.
- Everything’s slow. The parent is under-resourced. Add vCPUs and RAM — you’re running a host’s worth of work inside one VM.
- AMD host won’t enable it. AMD nested support arrived in later Windows builds than Intel’s. Make sure the host OS build is current.
A Generation 2 parent VM with a VHDX is the cleanest base for all of this — if you’re unsure which generation you built, Generation 1 vs Generation 2 explains the difference and why it’s fixed at creation.
Wrapping up
Nested virtualization comes down to one command — Set-VMProcessor -ExposeVirtualizationExtensions $true on a powered-off VM — plus two fixes people always forget: disable dynamic memory and turn on
MAC address spoofing so the inner VMs get RAM that behaves and a network that works. Give the parent
generous resources, install Hyper-V inside it, and you’ve got a self-contained lab you can checkpoint
and reset at will.
Keep it in its lane. It’s a fantastic tool for testing clusters, training, and trying things you’d never risk on a real host, but the overhead and lost mobility make it a poor fit for production. For more Hyper-V walkthroughs, browse the virtualization guides.