How to Run Hyper-V in vSphere 5.1

- select the contributor at the end of the page -
Today, Server 2012 Hyper-V cannot be virtualized inside a Microsoft virtualization product. In other words, you can't run Hyper-V as virtual machine inside Hyper-V on Windows 2012, or as a virtual machine inside Client Hyper-V in Windows 8.

You can, however, virtualize Hyper-V as a virtual machine inside VMware products like Fusion, Workstation, Free ESXi, or the commercial vSphere / vCloud Suite -- just a few tweaks are required.

Typically, the first time that admins have trouble running Hyper-V in one of these virtualization platforms is after they have created the VM and installed Windows. They try to go ahead and add the Hyper-V role and they get the message:

Hyper-V cannot be installed

The processor on this computer is not compatible with Hyper-V. To install this role, the processor must have a supported version of hardware-assisted virtualization, and that feature must be turned on in the BIOS.

If you are running Hyper-V on a physical server (with no virtualization hypervisor in between) then either your CPU really is not compatible or you need to enable Intel-VT or AMD-V in your server's BIOS.

However, if you are trying to run Hyper-V in a virtual machine (and your physical server has Intel-VT / AMD-V enabled) and you are getting this message in a VMware product then you need to make the tweaks below.

Hyper-V cannot be installed

Step 1

If you are using vSphere 5 or greater then you need to modify the vmware config file on the ESXi host that will run the Hyper-V virtual machine. To edit this file, ssh to the server and vi /etc/config/vmware. Add the line vhv.allow = "TRUE" to the file and save it with "wq".

Hyper-V cannot be installed-2

Step 2

Next, power off the Hyper-V VM and remove it from inventory. Browse the datastore that the VM is stored on and download the VMX configuration file to your local computer. Use Wordpad, or a similar text editor, to edit the VMX configuration file that you downloaded.

Change the guestos line to read:

guestOS = "winhyperv"

Save the file and upload it back to the datastore using the datastore browser.

Right-click on the virtual machine's VMX configuration and use "Add to Inventory" to add the VM back to the ESXi host that it was on (where you added the vhv.allow line).

Hyper-V cannot be installed-6

Step 3

Finally, upgrade the virtual machine hardware to hardware version 9 by right-clicking on the VM and clicking Upgrade Virtual Hardware.

Hyper-V cannot be installed-3

Now, power on the virtual machine and you shouldn't have any trouble adding the Hyper-V role, as you see below.

Hyper-V cannot be installed-7

With this configuration, you'll also be able to run 64-bit nested virtual machines inside this virtualized Hyper-V host. In the example below, you can see Windows Server 2012 running inside Windows 2008 R2 as a Hyper-V VM, which is running inside vSphere 5.1 as a virtual machine (that's a VM in a VM, all running inside vSphere).

Hyper-V cannot be installed-8

Note that you don't have to do all this work to run Hyper-V virtual machines in Workstation or Fusion - it's much easier (stay tuned for a future article on that from me, here on TST blogs).

For another great post on running Hyper-V in vSphere, see this post from

Ready to test your skills in VMware? See how they stack up with this assessment from Smarterer. Start this VMware test now.


Get our content first. In your inbox.

Loading form...

If this message remains, it may be due to cookies being disabled or to an ad blocker.


David Davis

David has authored over 50 courses for Pluralsight around enterprise data center technologies such as cloud computing, virtualization, and (especially) VMware vSphere. He is a partner at where he creates compelling enterprise technology content, moderates online events, and helps to connect some of the best-known technology companies in the industry with the end user community. With over 20 years in enterprise technology, he has served as an IT Manager, administrator, and instructor. David is an 11x VMWare vExpert, VCP, VCAP, & CCIE# 9369.