Creating a Nested Virtualization Lab on VMware 5.5

For my new lab I am using an old HP Z200 workstation with a Quad Core Xeon processor and 16GB RAM. For storage I have 1 SSD and 2 SATA disks.  After turning on Hyper threading in the BIOS I have 8 logical cores available in VMware.

1. Install VMware onto your physical host, assign a static IP address, setup a password etc

2. Browse to the IP address in a browser and download the vSphere client.

3. Connect to the host with the client and go to Configuration/Security Profile

4. Click on Properties in the upper right corner and you will get the a popup with all the services on this ESXi host. Select the SSH service and press the Options button.

services1

5. Select ‘Start and stop with host’ and then press start.

ssh-startup

5. Download and install Putty then SSH to your ESX host. Login as root.

Putty

6. Next we need to update the vmwareconfig file, inserting a couple of lines to allow the nesting of virtual hypervisors and installation of Microsoft Hyper-V.

echo ‘vhv.allow = “TRUE”‘ >> /etc/vmware/config
echo ‘hypervisor.cpuid.v0 = “FALSE”‘ >> /etc/vmware/config

We can run a cat command to verify the lines were inserted

cat /etc/vmware/config

cat

We should now be ready to install our nested Hypervisors!

7. Create and new VM with these settings:

Virtual machine version 8
4GB RAM
2 CPUs
Operating system set to ‘Other (64-bit)’
4 NICs (one connected to management network and the rest connected to trunk network with all vlans)
20 GB thin provisioned disk

check ‘edit the virtual machine settings before completion’ then press continue

vmconfig
Connect your VMware ISO file to the CD drive and check ‘connect at power on’ then finish.

ISO
Now, I had some issues getting the next bit to work. ESX would install but I couldn’t install any 64bit hosts. I thought at first my processor didn’t support it as I was getting these errors:

hardware error
I checked in the BIOS, but couldn’t find anything. When I tried to install a x64 VM I got this error:

Failed to start the virtual machine.
This virtual machine is configured for 64-bit guest operating systems. However, 64-bit operation is not possible.
This host does not support Intel VT-x.
For more detailed information, see http://vmware.com/info?id=152.

In the end this is how I got it working:

8. Power on the VM. Wait a few seconds then turn it off. Similar to the physical host we need to insert the vhv line into the config

Browse the file system until you can find the  .vmx file for the VM. Insert the vhv.allow line into the file

browse
9. Start the machine again and it should complete with no errors and 64 bit hosts should install nicely.

nestedx64
Reference material:
http://www.vcritical.com/2011/07/vmware-vsphere-can-virtualize-itself/
http://www.virtuallyghetto.com/2011/07/how-to-enable-support-for-nested-64bit.html
https://communities.vmware.com/docs/DOC-8970

Advertisements
Posted in Virtualization, VMware

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: