With the release of vSphere 5/ 5.5, one of the most sought out feature from VMware is the ability to run nested 64bit and Hyper-V guest virtual machines in a virtual ESXi instance. Previous to this, only 32bit virtual machines were supported as the VT-x/AMD-V Hardware Virtualization CPU instructions could not be virtualized and presented to the virtual ESX(i) guest. This feature is quite useful for home and lab setups in testing new features or studying for VMware certifications and running multiple vESX(i) instances.
You will still be required to have a 64bit capable system and CPU and you will need to be running ESXi 5.0/5.5, this will not work for ESX(i) 4.x or older.
Note: I’m not sure why these two additional guestOS type is not available from the default creation menu, but are available after the initial VM shell is created.
3. You are now ready to install ESXi 5.0/5.5 in this new vESXi host and then you can create and power on nested 64bit guestOS within that vESXi instance as denoted from the picture below
Creating vESXi 5.0/5.5 Instance using Hardware Version 4/7:
1. To create a virtual ESXi 5.0/5.5 instance, start off by just creating a standard RHEL5/6 64bit VM using the vSphere Client
2. Now you will need to add the following advanced .vmx parameter: monitor.virtual_exec = “hardware” which can be done through the vSphere Client and/or editing the .vmx parameter manually.
3. Next you will need to add some cpuid bits, depending if you are running an Intel or AMD CPU, the respective entries are required:
cpuid.1.ecx = “—-:—-:—-:—-:—-:—-:–h-:—-“
cpuid.80000001.ecx.amd = “—-:—-:—-:—-:—-:—-:—-:-h–”
cpuid.8000000a.eax.amd = “hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh”
cpuid.8000000a.ebx.amd = “hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh”
cpuid.8000000a.edx.amd = “hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh”
4. You are now ready to install ESXi 5.0/5.5 in this new vESXi host and then you can create and power on nested 64bit guestOS within that vESXi instance
By using a VM that is hardware version 8, you can easily automate the creation of vESXi 5.0/5.5 instance by changing the guestOS string in the .vmx parameter to “vmkernel” and the above configurations other than “vhv” string needed for either an Intel or AMD system are automatically configured.
For proper networking connectivity, also ensure that either your standard vSwitch or Distributed Virtual Switch has both promiscuous mode and forged transmit enabled either globally on the portgroup or distributed portgroup your nested ESXi hosts are connected to.
Creating a vHyper-V Instance on physical ESXi 5.5:
1. To create a virtual Hyper-V instance, start off by creating a Windows 2008 Server R2 64bit VM using the vSphere Client
2. If you are using Hardware Version 7, you will need to follow the instructions in “Creating vESXi 5.5 Instance using Hardware Version 4/7″ to add the additional parameters to the VM. If you are using Hardware Version 8, you just need to change the guestOS type to VMware ESXi 5.5
3. You need to add one additional .vmx parameter which tells the underlying guestOS (Hyper-V) that it is not running as a virtual guest which in fact it really is. The parameter is hypervisor.cpuid.v0 = FALSE
4. You are now ready to install Hyper-V in a virtual machine and you can also spin up nested 64bit guestOSes in this virtual Hyper-V instance.
As you can see, now you can even run Hyper-Crap, err I mean Hyper-V as a virtualized guest under ESXi 5.5. I did not get a chance to try out Xen, but I’m sure with the ability to virtualize the Hardware Virtualization instructions, you should be able to run other types of hypervisors for testing purposes.
This is a really awesome feature but note that this is not officially supported by VMware, use at your own risk.