Today I needed to get a Hyper-V host up and running so that I could mount the Citrix XenApp 6 EVA (Evaluation Appliance). Unfortunately I could not find the a VMware version of the appliance so I went ahead and downloaded the Hyper-V version. I know I could always convert the VHD to a VMDK, but I figured I’d learn a little Hyper-V while I am at it!
Having a lab, I figured why not try and get the Windows Server 2012 Hyper-V going as a Virtual Machine on one of my ESXi hosts. I tried getting Windows Server 2008 R2 Hyper-V working, but no matter what I did, the VM’s would not start.
Doing some more research I came across successful configurations with Windows Server 2012 Hyper-V running as a nested hypervisor on an ESXi 5.0/5.1. In my case, I was running ESXi 5.1 so the steps we need to take to get Hyper-V working are little different from 5.0. To give credit where it’s due, I found William Lam and David Davis‘ articles on how to get nested Hyper-V working really helpful. To summarize the steps we need to take to get all of this going is as follows:
1. SSH on to the ESXi host or hosts (in my case its two hosts) and add the parameter vhv.enable = “TRUE” (ESXi 5.1) or vhv.allow = “TRUE” (ESXi 5.0) to /etc/vmware/config, in my case I used VI editor (vi /etc/vmware/config)
2. Next, we need to modify the vmx configuration file of the virtual machine in order to trick Hyper-V to think it’s running on a physical server. To do this, we need to add the following parameter hypervisor.cpuid.v0 = “FALSE” like this:
3. That’s it, we should now be able to install and launch a virtual machine within the nested Hyper-V virtual machine: