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.
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:
- Create a virtual machine on Hyper-V with the reuqired operating system and VM version for the Hyper-V host and the virtual machine.
- After the VM is installed turn off the VM.
- Run the following command on the base Hyper-V host to enable nested virtualization for the VM.
Set-VMProcessor -VMName -ExposeVirtualizationExtensions $true
- 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.
If you don’t run the command, you will get the following error when you try to install Hyper-V.
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.
I hope this blog post was helpful and if you have any questions feel free to leave a comment below.Tags: AMD, Azure, CPU, Hyper-V, Intel, Microsoft, Microsoft Azure, Nested Virtualization, Processor, Virtualization, Windows, Windows 11, Windows Server, Windows Server 2022 Last modified: September 8, 2021