I found several posts regarding ‘nesting’ hypervisors (installing a hypervisor within a hypervisor), since I wanted to test out Hyper-V in a VM, and followed this one from William Lam. It worked to allow Hyper-V to pass validation, but after a few reboots, I’d get the dreaded “Windows can’t boot” screen. You have the option to continue, which only reboots to this screen; repair, which gives a command prompt and a few other options; or power off.
I tried the typical bootcfg commands, but it couldn’t read the boot.ini. Some other tests were showing the disk was read-only, which was strange. William’s post was for 2008 R2 and not Windows Server 8, but it worked for the most part. I did have a few other issues I worked through, continue reading for those and how I fixed them.
Do as instructed in the post I referenced (create an empty Windows 2008 R2 VM), accept most defaults, except set the NICs to None. I tried the E1000, but it would blue screen with ‘dpc_watchdog_violation’ every time. I used VMXNET3, but VMware Tools installation would hang at the VMXNET3 drivers. I did find that the E1000E worked 100% without the tools needing to be installed. You have to add the NIC AFTER VM creation. Once the VM is created, change the guest OS to ESXi 5.x, save it, now go back and add two (2) E1000E adapters (you could probably only add 1), save it again. Setting OS to ESXi 5 will also add some cpu masking, which we’ll address later. You need to make sure you add hypervisor.cpuid.v0 = “FALSE” in the vmx file, you can do this however you like, I used vi.
Make sure it saved, now go back into the VM settings in the GUI, Options Tab, and CPUID mask. I clicked Reset All to Default, then set Level 1 ecx to “—- —- —- —- —- —- –H- —-” as pointed out in Williams post, save everything and check the vmx file, it will look a little different. Now you’ll need to also add mce.enable = “TRUE” (in red).
After I did all this, the server booted up fine after installing Hyper-V version 3. I discovered the mce.enabled thing HERE after some googling.
Not sure if this matters, but I did NOT install VMware Tools prior to enabling the Hyper-V role. When I talked about it previously, I never got it to work right, so left that step out until the role worked. After Hyper-V is installed, I installed ‘Typical’ VMware tools and all is well.
**UPDATE 06/21/2012 – How to setup in VMware Workstation 8**
When I was at Dell earlier this week, I pointed out this post on how to install Windows Server 2012 with Hyper-V in a VM on ESXi. One of the guys in the room mentioned he was having trouble getting it to work in VMware Workstation, so I tested the same theory and it worked. I’m using a Dell Latitude E6420 with the Core i5, running Windows 7 & Workstation 8 for testing this.
Everything pretty much still applies, create an empty Windows Server 2008 R2 VM, remove unneeded stuff (floppy, printer, USB, sound), add a second NIC (not required), and make sure you go to the Processor’s virtualization engine and check the box to Virtualization to Intel VT-x/EPT or AMD-V/RVI.
Save the VM, then remove it from Workstation (remove, don’t delete :D), then open the vmx file in notepad. Any NIC you have should be changed to e1000e instead of simply e1000.
ethernet0.virtualDev = "e1000"becomes
ethernet1.virtualDev = "e1000"
ethernet0.virtualDev = "e1000e"Then you’ll need to add the same two things from above, add them to the bottom after the last entry:
ethernet1.virtualDev = "e1000e"
hypervisor.cpuid.v0 = "FALSE"
mce.enable = "TRUE"
Now add that vmx file back into Workstation. You could probably change the OS to ESXi 5, but I left it as 2008 R2.
You might run across one specific error:
If you see anything like this when you power on the VM, it likely means you don’t have proper hardware support, or it’s disabled in the BIOS. You can also find it in the messages section, or on the bottom of your VM console.
The reason I bring this up is because my desktop (Dell Precision 690 with dual Xeon 5130 “Woodcrest” CPUs) threw this for me and wouldn’t work. You can still virtualize 64-bit VMs, but nested VMs will only be 32-bit. This bites us because the Server 2012 OS becomes something like a nested 64-bit VM on the hypervisor, something similar to how the management console was in ESX. The OS sees a 64-bit CPU, but it doesn’t see the needed VT passed through to it. This is why it throws an error about not having supported hardware to run Hyper-V.