Sideway from Sideway

Knowledge Base

Draft for Information Only


Microsoft Windows 10 Nested Hyper-V
 Nested Virtualization
 Nested Hyper-V Requirements
 Nested Virtualization Option
  Enable Nested Virtualization Option
  Disable Nested Virtualization Option
 Memory Option
 Networking Option
  MAC Address Spoofing
  Network Address Translation (NAT)

Microsoft Windows 10 Nested Hyper-V

Nested Virtualization

Nested virtualization is a feature of running a Hyper-V inside of a Hyper-V virtual machine (VM). The nested virtualization feature of a Hyper-V virtual machine enables running other testing configurations on the same virtural machine.

Nested Hyper-V Requirements

  1. The Hyper-V virtual machine configuration must be version 8.0 or greater.
  2. The Hyper-V host and guest must both be Windows Server 2016/Windows 10 Anniversary Update or later.
  3. Nested virtualization is currently only available for Intel processor with VT-x and EPT technology. last updated 18Dec2016
  4. 3rd Party Virtualization Apps that requires hardware virtualization extensions other than Hyper-V are also not supported Hyper-V virtual machine. last updated 18Dec2016
  5. vmemory size 4G or more with dynamic memory disabled
  6. vcpu 2 or more
  7. ExposevirtualizationExtensions feature enabled.


Modern processors provide features, e.g. Intel VT-x and AMD-V for making machine virtualization more easily. Hyper-V also relies on these processor virtual extension features to run virtual machines. By design, Hyper-V always prevents other software from using these processor capabilities once Hyper-V starts. This prevents guest virtual machines from running Hyper-V. However, nested virtualization feature makes these processor capabilities also available to guest virtual machines. In other words, the virtual extension features of phyical processor is also available to the virtual processor of guest OS through the optional nested virtualization feature.

Nested Virtualization Option

The nested virtualization feature is an optional feature of a Hyper-V virtual machine. The nested virtualization feature is controlled by the ExposeVirtualizationExtensions attribute of a Hyper-V virtual machine. The nested virtualization feature must be enabled before a virtual machine is ON state. In other words, the setting of nested virtualization feature of a virtual machine can only be done while the virtual machine is stopped in the OFF state.

Enable Nested Virtualization Option

Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true

Disable Nested Virtualization Option

Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $false

Memory Option

The nested virtualization feature itself does not affect the choice of virtual machine memory option. However, when Hyper-V is running inside a virtual machine, the dynamic memory and runtime memory resize options will be disabled because the virtual machine must be turned off to adjust its memory. In other words, the amount of memory will not fluctuate even if dynamic memory is enabled or any attempt to adjust the amount of memory while a virtual machine without dynamic memory enabled is running will fail.

Networking Option

The virtual networking for second-level virtual machines is different from first-level virtual machines. The two options are MAC address spoofing and NAT networking

MAC Address Spoofing

In order for network packets to be routed through two virtual switches, MAC address spoofing must be enabled on the first level of virtual switch. e.g the PowerShell command

Get-VMNetworkAdapter -VMName <VMName> | Set-VMNetworkAdapter -MacAddressSpoofing On

Network Address Translation (NAT)

The second option relies on network address translation (NAT). This approach is best suited for cases where MAC address spoofing is not possible, like in a public cloud environment. First, a virtual NAT switch must be created in the host virtual machine (the "middle" VM). Note that the IP addresses are just an example, and will vary across environments:

New-VMSwitch -Name VmNAT -SwitchType Internal 
New-NetNat –Name LocalNAT –InternalIPInterfaceAddressPrefix “”

Next, assign an IP address to the net adapter:

Get-NetAdapter "vEthernet (VmNat)" | New-NetIPAddress -IPAddress -AddressFamily IPv4 -PrefixLength 24

Each nested virtual machine must have an IP address and gateway assigned to it. Note that the gateway IP must point to the NAT adapter from the previous step. You may also want to assign a DNS server:

Get-NetAdapter "Ethernet" | New-NetIPAddress -IPAddress -DefaultGateway -AddressFamily IPv4 -PrefixLength 24 Netsh interface ip add dnsserver “Ethernet” address=<my DNS server>



ID: 180100035 Last Updated: 2018/1/31 Revision:


Home (5)



HBR (3)



Hobbies (7)


Chinese (1097)

English (336)

Reference (66)


Hardware (149)


Application (187)

Digitization (24)

Numeric (19)


Web (602)new




Knowledge Base

Common Color (SC)

Html Entity (Unicode) (SC)

Html 401 Special (SC)

OS (373)new

MS Windows

Windows10 (SC)

.NET Framework (SC)new

DeskTop (6)



Formulas (8)

Number Theory (206)

Algebra (20)

Trigonometry (18)

Geometry (18)

Calculus (67)

Complex Analysis (21)


Tables (8)


Mechanics (1)

Rigid Bodies

Statics (92)

Dynamics (37)

Fluid (5)

Fluid Kinematics (5)


Process Control (1)

Acoustics (19)

FiniteElement (2)

Biology (1)

Geography (1)

Latest Updated Links

Copyright © 2000-2019 Sideway . All rights reserved Disclaimers last modified on 10 Feb 2019