Hyper-V 2016 Nested Virtualization

Before we enable Nested Virtualization we need to talk about prerequisites and limitations.
Hyper-V Physical Host Prerequisites
- Hyper-V Host must run Windows Server 2016
- Intel processor with VT-x and EPT technology. AMD CPU is not supported
- Device Guard needs to be disabled
- Virtualization Based Security needs to be disabled
- VM must run Windows Server 2016
- Dynamic Memory must be disabled
- MAC spoofing needs to be enabled
- Minimum 4 GB RAM for VM Hyper-V Host (I would recommend at least 8 GB RAM)
- Checkpoints will not work if you try to apply it on a running VM
- Memory resize is not working
- Live Migration is not working on virtualized hyper-v host
- Save and restore is not working
- Hyper-V Physical Host = HVTEST01
- Hyper-V Virtual Host = NestedHV (8 vCPU, 10 GB RAM)
Before we begin be sure to turn off the VM which will be configured as Virtual Hyper-V.
Right-Click on VM and select Settings

Memory – Dynamic Memory needs to be disabled
(Powershell: Set-VMMemory -VMName “NestedHV” -DynamicMemoryEnabled $false)

Next, expand Network Adapter –> Advanced Features and enable MAC Address Spoofing
(Powershell: Get-VMNetworkAdapter -VMName “NestedHV” | Set-VMNetworkAdapter -MacAddressSpoofing On)

Last thing we need to do is to enable nested virtualization by running
Set-VMProcessor -VMName NestedHV -ExposeVirtualizationExtensions $true

Now that the VM is configured to support nested virtualization, we need to install the Hyper-V role in the VM.
Start the VM and run Powershell as Admin
Install-WindowsFeature –Name Hyper-V -IncludeManagementTools – Restart

When it is done, login and start Hyper-V Manager. I will create new VM (NestedVM).

That’s it.
No comments:
Post a Comment