Tag Archives: virtual machine

How to run nested Hyper-V in vSphere 6.0

Few days ago I was testing a virtual –to- virtual converter software from StarWind, and as a by-product of an upcoming blog on the matter, I took some screenshot and wrote down settings that are relevant to running a nested Hyper-V in an ESXi environment.

The problem

When Installing the Hyper-V role on a windows 2012R2 machine that is a virtual machine, you get an error message saying “Hyper-V cannot be installed: A hypervisor is already running”, and to “fool” the Windows OS to believe it is running on a native x86 machine, you have to set several options for the VM

The steps when installing hyper-V on a Windows 2012R2

You select the “Hyper-V” role and hit “Next”

And you hit next, and automatically get the option to install the management tools as well, and in most cases you would want that, so you click “Add Features” to continue

And soon as you hit the add feature button you get a validation result popup stating that you can’t install hyper-V on this windows machine.

Sure, – you have a hypervisor running on your ESXi Host, – but you want to have a hypervisor running on this virtual machine as well. –

The solution

First you have to shut down the VM and remove it from vCenter inventory

Then enable SSH on the ESXi host if you have not already

Then you edit the .vmx file for the VM and add 2 lines at the bottom of the file.

vhv.enable = “TRUE”
hypervisor.cpuid.v0 = “FALSE”

Then using the datastore browser find the same .vmx file, and right click it and select add to inventory



In the web client, edit the settings for the VM and expand the CPU settings. There under “CPU/MMU virtualization (*) section, select “hardware CPU and MMU”

Also notice that the checkbox is set for “hardware virtualization”, and that is due to the hypervisor.cpuid.v0 = “FALSE” setting in the .vmx file.

When finished, boot up the VM and go back to the Add roles and Features Wizard on the VM

Now the wizard runs and installs Hyper-V on a nested VM


When you have this set up, and you have created a Hyper-V virtual machine, and you need network connectivity to the VM, you need to set your ESXi vSwitch security policy to “Promiscuous mode: Accept”. – This is the same setting that you have to do when you run nested ESXi and you have vm’s that need network connectivity.

When this was ready, I tried to run the Hyper-V integration services tools on the nested hyper-v VM, (this sounds like something from inception…)

I get and error “The Hyper-V Integration service can only be installed inside of a virtual machine running under Hyper-V”

I did not find a workaround for this, but if you have one, please let me know in the comments or by sending me an e-mail and I’ll update the post.


You can run a nested Hyper-V installation under ESXi if you need to do some basic testing. In my case I was testing a Virtual to Virtual Converter software from StarWind Software, and need create a hyper-V virtual machine, convert it to a .vmdk file and boot it up in my vSphere based lab (and via versa), but don’t expect to have a good performance on the nested VM 😉


Share if you feel this post to be useful.