How to run a Hyper-V server on an ESXi VM (nested virtualization)

We know it’s a weird scenario but you may need to run Hyper-V on an ESXi virtual machine for testing purposes. Let’s make an example: you have an ESXi 5.5 node with a Windows Server 2012 R2 running on it. You need to install Hyper-V.. but you can’t! Because your hardware configuration doesn’t support virtualization (Windows will refuse to add the role).

Is there a solution? Yes, an easy one.

First of all, Power Off the virtual machine:

How to run a Hyper-V server on an ESXi VM (nested virtualization)

Then remove it from the inventory (it won’t be deleted):

How to run a Hyper-V server on an ESXi VM (nested virtualization)

Go to the Datastore:

How to run a Hyper-V server on an ESXi VM (nested virtualization)

Open the virtual machine folder and download the .vmx file:

How to run a Hyper-V server on an ESXi VM (nested virtualization)

Edit the .vmx file with Notepad++. Add these two rows at the end of the configuration file (be careful with the quotes!!):

vhv.enable = "TRUE"
hypervisor.cpuid.v0 = "FALSE"

How to run a Hyper-V server on an ESXi VM (nested virtualization)

Upload the edited .vmx file, right-click on it and select Add to Inventory:

How to run a Hyper-V server on an ESXi VM (nested virtualization)

We’re almost ready. Before launching the virtual machine edit the settings and “force” VT-x/AMD-V support:

How to run a Hyper-V server on an ESXi VM (nested virtualization)

Now you can Power On the machine and install the Hyper-V role.

Share: Facebook Twitter Linkedin

Comments