Nested Virtualization : Windows Server 2016

Hyper-V relies on hardware virtualization support (e.g. Intel VT-x and AMD-V) to run virtual machines. Typically, once Hyper-V is installed, the hypervisor hides this capability from guest virtual machines, preventing guests virtual machines from installing Hyper-V (and many other hypervisors, for that matter).

Nested virtualization exposes hardware virtualization support to guest virtual machines. This allows you to install Hyper-V in a guest virtual machine, and create more virtual machines “within” that underlying virtual machine.

Screen Shot 2017-06-29 at 12.07.50 PM
non-nested
Screen Shot 2017-06-29 at 12.08.03 PM
Nested

 

Configure Nested Virtualization
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true

Disable Nested Virtualization
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $false
MAC Address Spoofing
Get-VMNetworkAdapter -VMName <VMName> | Set-VMNetworkAdapter -MacAddressSpoofing On

Dynamic Memory and Runtime Memory Resize

When Hyper-V is running inside a virtual machine, the virtual machine must be turned off to adjust its memory. This means that even if dynamic memory is enabled, the amount of memory will not fluctuate. For virtual machines without dynamic memory enabled, any attempt to adjust the amount of memory while it’s on will fail.

Note that simply enabling nested virtualization will have no effect on dynamic memory or runtime memory resize. The incompatibility only occurs while Hyper-V is running in the VM. I have not tested NAT, so would not be able to comment on that.

Run Hyper-V in a Virtual Machine with Nested Virtualization

Advertisements