How to Implement Nested Virtualization in Windows Server

Hi, Today, I want to show you how to implement nested virtualization in Windows Server. This feature is helpful for testing and training purposes (such as preparing for a certification exam).

Nested virtualization is the ability to configure a Hyper-v guest VM to function as a Hyper-v host.

Prerequisites:

  • You must have a physical host and a virtual machine on that host running Windows Server 2016 or higher.
  • The physical host must have an Intel processor with VT-x and Extended Page Tables (EPT) virtualization support.
  • The configuration of the virtual machine must be version 8.0 or higher.

Before you install Hyper-v on the VM, you must provide its virtual processor with access to the virtualization technology on the physical computer. To do this, you must shut down the VM and run the following commands as Administrator on the physical Hyper-V host.

Set-VMProcessor

With the following command, you can check that the feature is enabled.

Nested virtualization

In addition, you must make the following configuration changes in the virtual machine that function as a Hyper-v host:

Disable Dynamic Memory

To disable dynamic memory on the virtual machine, using the Set-VMMemory cmdlet with the following syntax:

Set-VMMemory

Enable MAC address spoofing

To enable MAC Address Spoofing on the virtual machine, using the Set-VMNetworkAdapter cmdlet with the following syntax:

Set-VMNetworkAdapter

Once you’ve made these changes, you can start the virtual machine and install the Hyper-v role.

Important: Virtual machines that are being used with nested virtualization no longer support the following features.

  • Live migration.
  • Checkpoints.
  • Live memory resizing.
  • Save and Restore.

To learn more about This feature, check out this link: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/nested-virtualization