Hyper-V Nested virtualization for AMD processors Windows 11 and Windows Server 2022

Written by 7:16 am Microsoft, Microsoft Azure, Windows, Windows Server • One Comment

Hyper-V Nested virtualization for AMD processors

Windows Server 2022 just became generally available last week with a ton of great improvements in security, hybrid cloud management, and application platform. Another new feature supported with Windows Server 2022 is Hyper-V Nested virtualization for AMD processors. Nested Virtualization isn’t something new, in fact, it was introduced with Windows Server 2016 and the Windows 10 Anniversary update but only supported with Intel CPUs. With Windows Server 2022 and upcoming Windows 11, people can use Hyper-V Nested Virtualization with AMD CPUs.

Back in June 2020, Chris Huybregts shared more about AMD Nested Virtualization support.

What is Hyper-V Nested Virtualization

Nested virtualization is a feature that allows you to run Hyper-V inside of a Hyper-V virtual machine (VM). This is helpful for running the Android Emulator in a virtual machine, provide Azure users flexibility in how they want to set up their environments, run Hyper-V Containers inside a virtual machine, or testing configurations that ordinarily require several hosts.

Hyper-V Nested Virtualization Diagram (Source Microsoft Docs)

This means Hyper-V Nested Virtualization now works with Intel and AMD processors to enable the following scenarios:

  • Run Hyper-V in a Hyper-V for testing configurations and different applications scenarios. This is perfect for IT Pros and developers if they need a lab environment.
  • Provides Azure users flexebility on how they set up their environment.
  • Developers and IT Pros can run Hyper-V Containers inside a virtual machine
  • and more

How to set up Hyper-V Nested Virtualization

To set up a Hyper-V host nested inside a Hyper-V virtual machine you can just simply follow these steps:

Set-VMProcessor Hyper-V VM
Set-VMProcessor Hyper-V VM
  1. Create a virtual machine on Hyper-V with the reuqired operating system and VM version for the Hyper-V host and the virtual machine.
  2. After the VM is installed turn off the VM.
  3. Run the following command on the base Hyper-V host to enable nested virtualization for the VM.
    Set-VMProcessor -VMName -ExposeVirtualizationExtensions $true
  4. Start the virtual machine and install the Hyper-V role inside the Hyper-V VM.

Now you can run a Hyper-V VM inside a Hyper-V VM.

Hyper-V Nested virtualization for AMD processors Windows 11 and Windows Server 2022
Hyper-V Nested virtualization for AMD processors Windows 11 and Windows Server 2022

If you don’t run the command, you will get the following error when you try to install Hyper-V.

Hyper-V cannot be installed The processor does not have required virtualization capabilities
Hyper-V cannot be installed The processor does not have the required virtualization capabilities

You can find the full documentation here on Microsoft Docs or also follow my guide on how to set up Nested Virtualization in Microsoft Azure.

Conclusion

I hope this blog post was helpful and if you have any questions feel free to leave a comment below.

Tags: , , , , , , , , , , , , , Last modified: September 8, 2021
Close Search Window
Close