Enable Nested Virtualization on a Hyper-V Virtual Machine
Expose virtualization extensions to a stopped Hyper-V VM so the guest can run Hyper-V, WSL 2, or virtualized containers, then verify inside the guest.
11 Apr 2026, 03:24 UTC

Problem and takeaway
A Hyper-V virtual machine hides the processor's virtualization extensions from its guest operating system by default. That prevents the guest from installing Hyper-V, running WSL 2, or starting virtualization-based containers. The useful takeaway is to expose those extensions on the host with Set-VMProcessor -ExposeVirtualizationExtensions $true while the VM is stopped, then enable the Hyper-V feature inside the guest and reboot.
Desired outcome
The guest VM reports that all Hyper-V requirements are satisfied and can itself run a hypervisor or virtualization-based workload. On the host, Get-VMProcessor shows ExposeVirtualizationExtensions as True, and the VM starts without new VMMS errors.
Prerequisites and version assumptions
- Host running Windows Server 2016 or later, or Windows 10/11, with the Hyper-V role installed.
- Host CPU with Intel VT-x or AMD-V and Second Level Address Translation (SLAT). SLAT is the memory-translation support required for a hypervisor to run inside another hypervisor.
- An elevated PowerShell session on the host (Run as Administrator).
- The target VM must be powered off on most host builds before toggling this setting.
- For AMD hosts, nested virtualization support depends on the host build; older builds expose this option primarily for Intel VT-x. Confirm the build with
(Get-ComputerInfo).OsBuildNumberbefore proceeding. - Assign enough vCPU, memory, and disk to the VM. Avoid relying on dynamic memory for nested workloads, because a nested hypervisor can behave unpredictably when the host reclaims guest memory.
Enable virtualization extensions on the host
Run the following in an elevated PowerShell session on the Hyper-V host. Replace LabVM with your actual virtual machine name.
- List virtual machines and their states:
Get-VM | Select-Object Name, State
- If the VM is running, shut it down. The setting usually cannot be changed while the VM is running on older host builds.
Stop-VM -VMName "LabVM" -TurnOff
- Expose the virtualization extensions:
Set-VMProcessor -VMName "LabVM" -ExposeVirtualizationExtensions $true
- Start the VM:
Start-VM -VMName "LabVM"
These commands require local Administrator or Hyper-V Administrator rights on the host. Changing ExposeVirtualizationExtensions modifies the VM configuration file; if the VM fails to start afterward, see the rollback section.
Verify the host-side setting
Get-VMProcessor -VMName "LabVM" | Select-Object Name, ExposeVirtualizationExtensions
Confirm ExposeVirtualizationExtensions is True. Then check the VMMS administrative log for errors after the change or after starting the VM:
Get-WinEvent -LogName 'Microsoft-Windows-Hyper-V-VMMS/Admin' -MaxEvents 10
New errors in that log indicate a configuration or hardware incompatibility.
Enable Hyper-V inside the guest
Sign in to the guest operating system and open an elevated PowerShell session. Install the Hyper-V role and required management tools:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Restart the guest:
Restart-Computer
After reboot, confirm the feature state:
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V | Select-Object FeatureName, State
State should be Enabled.
Confirm virtualization support inside the guest
Run systeminfo in the guest and review the Hyper-V Requirements block. All four items should read Yes:
- VM Monitor Mode Extensions
- Virtualization Enabled In Firmware
- Second Level Address Translation
- Data Execution Prevention
If any item reads No, the nested extensions were not applied correctly, the host CPU lacks the required capability, or firmware virtualization is disabled on the host.
Limitations and practical guidance
- Nested virtualization is intended for development, testing, and lab workloads. It adds CPU and memory overhead and is not a substitute for bare-metal virtualization in production.
- Some virtualization-based security features inside the guest, such as Credential Guard or Device Guard, may not function when the guest itself is a virtual machine.
- AMD host builds vary; verify the OS build before assuming nested virtualization is available.
- Do not enable this setting on a production VM solely to run containers unless you have tested the memory and CPU overhead.
Rollback
Because this procedure changes VM configuration state, you can reverse it while the VM is stopped:
Stop-VM -VMName "LabVM" -TurnOff
Set-VMProcessor -VMName "LabVM" -ExposeVirtualizationExtensions $false
Start-VM -VMName "LabVM"
If you enabled the Hyper-V role inside the guest and no longer need it, remove it from an elevated guest PowerShell session, then restart:
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
Restart-Computer
If the VM will not start after the original change, temporarily disable ExposeVirtualizationExtensions and review the VMMS admin log before reapplying.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.