How to Enable Nested Virtualization in Hyper-V Server

Do you know what you can run hypervisor within the virtual machine that is hosted on the hypervisor? Yes, it is possible. It doesn't work by default, but you'll need to do some configuration on our Hyper-V Server.
Enable Nested Virtualization in Hyper-V
Source: Unsplash.com

Do you know what you can run hypervisor within the virtual machine that is hosted on the hypervisor? Yes, it is possible. It doesn’t work by default, but you’ll need to do some configuration on our Hyper-V, VMware or XenServer.

In order to do it on Hyper-V Server, Microsoft recommends that Hyper-V host and guest are running Windows 10 or Windows Server 2016 and later, VM configuration version 8.0 or greater and Intel CPU with VT-X (x86 virtualization) and SLAT (Second Level Address Translation) technology. Currently, it is not supported on AMD CPUs. Please note that you can run your Hyper-V with AMD CPU, but you can’t do nested virtualization.

In all my cases I was using nested virtualization for testing purposes such as deploying and testing clustered Hyper-V environment. It is not recommended to run nested virtualization for productive machines and services.

If nested virtualization is not enabled, you’ll see error as shown in the screenshot below.

Hyper-V Validation Failed

The procedure of enabling nested virtualization for specific VM is straightforward. In my case I want to enable nested virtualization on my VM: Windows Server 2019. So, let’s start it.

  1. Shutdown your virtual machine
  2. Run PowerShell as administrator and type the following command and press Enter
Set-VMProcessor win-srv-2019 -ExposeVirtualizationExtensions $true

where win-srv-2019 is the name of virtual machine.

Enable nested virtualization in PowerShell
  1. Start your virtual machine
  2. Open Server Manager
  3. Click Install roles and features
  4. Install Hyper-V Server

Thank you for reading this article. In case of any questions, feel free to comment or contact me.

Comments (2):

  1. Portal Edukacja

    March 25, 2021 at 12:04

    Your writing style has been surprised me. Thanks, quite nice post.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Share via
Copy link