How to run Hyper-V on ESXi


How-to run nested Hyper-V 2012 Server on latest version of ESXi 5.1. If you want to test the latest Microsoft Hyper-V running as a VM on ESXi 5.1 free version, you might run into a following error: Hyper-V cannot be installed: A hypervisor is already running.” when trying to install the Hyper-V role. Just follow this How to run Hyper-V on ESXi.

In ESXi 5.1 free version the tweak slightly changed (compared to ESXi 5.0) and it’s much easier to install the Hyper-V role, to actually enable Hyper-V as a VM with the possibility to run second level nested 64bit VMs inside of that Hyper-V.

There is no need to SSH and tweak the /etc/vmware/config file in ESXi 5.1 free. I’m using the latest ESXi 5.1.0 build: 838463.  The only think which is necessary is to change single line in VMX configuration file of the Hyper-V VM.

Before starting, you have to make sure that your physical CPU is compatible:

– Intel Nehalem Generation (Xeon Core i7) or later processors or AMD Opteron Generatioin 3 (Greyhound) or later processors is used for the physical box.
– Verify that Intel VT-x or AMD-V is enabled in the BIOS so that hardware assisted virtualization is possible.

To be able to run nested Hyper-V on by using ESXi 5.1 free, you’ll have to have CPU (EPT or AMD RVI) capable so you’ll be able to run 64bits nested VMs.

When using the classic Windows vSphere client to connect to your Free ESXi 5.1 box, you’ll just need to follow this quick guide.

To detail the whole process on setting up nested Hyper-V version 3 on VMware ESXi 5.1 Free:

ESXi - How to run nested Hyper-V01. Start creating new VM. Choose Microsoft Windows Server 2012 (64 bit) as a template when going through the assistant.

Before powering On go to the VM properties > Options tab > CPU/MMU Virtualization > Choose Use Intel VT-x/AMD-V.

Note: You will not have the option to create a VM hardware version 9 directly, so create the VM using hardware version 8 first , and then, in your vSphere client, do a right-click > and choose the option Upgrade Virtual Hardware.

This will upgrade to the latest Virtual Hardware version 9 (or rather vmx-09).

02. Now change one line in the VMX configuration file of that VM from:

  guestOS = "windows8srv-64" to guestOS = "winhyperv"

You can use the datastore browser > download that VMX file to your desktop > change the line as on the example above > upload it back to the datastore.

On the image bellow, the underlying ESXi 5.1 Free version installed on the physical box runs Hyper-V as a VM and then there is a second level nested Windows 7 x64 VM runing inside of that Hyper-V. And the Windows7 VM is very fast as well. (Booting in 16-18 sec) . I have to say that both VMs runs from Flash storage.

Hyper-V on ESXi 5.1 - Running Hyper-V as a VM on ESXi 5.1

Optionaly you can add following line to the VMX file which will prevent powering On this Hyper-V VM on a host which does not have CPU capable. But this is optional only, in the case you’re using vCenter and have several hosts with capable and non CPU capable virtualization extentions. In case you’re using standalone ESXi Free version you don’t have to do that.

featMask.vm.hv.capable = “Min:1″

A quick quote from VMware communities forum message which explains this optional parameter:

With this setting, VC knows that the VM requires virtualized HV, and it won’t let you try to power on the VM on a host that isn’t capable of virtualized HV support. VC doesn’t know thatguestOS=”winhyperv” implies the same constraint. Without this line, you’ll get a more unfriendly failure if you try to power on the VM on a host that can’t handle it.

Source: VMware Community Forum

This post ESXi 5.1 Free – How to run nested Hyper-V was pubished at ESX Virtualization at www.vladan.fr.  Feel free to contact me through Twitter or subscribe via RSS.

Comments

  1. Satish Sharma says

    Hi,

    I am running ESXi 5 in Vmware workstation 9 in my laptop with 8 GB RAM.
    In Bios i have enabled intel VT.

    I cannot run 64 bit VM in ESXi.
    Do you have any solution for this.

    Regards
    Satish

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current ye@r *