Tuesday, November 12, 2013

Nested Virtualization in vSphere 5.5 (Lab Purpose Only) 7 Simple Steps

Nested Virtualization is nothing but running Virtual Machine inside a Virtual Machine. So there are two layers of Hypervisors and on top of that the vSphere Environment is built. After Installing ESXi on a Physical Server, we get lot of Hardware independence, where resources can be optimized and over-committed but if you just have one physical server then you wouldn't be able to test all the Vmware features (like vMtoion, HA, DRS) which are only available if you have required hardware like shared storage, Distributed Virtual Switch etc.

The above picture shows two layers of Virtualization (ESXi) on single Physical Server and a filer is used to present local storage as shared storage to both ESXi Virtual Machines. Which is same as shared storage presented to two Physical Servers.

In my case I have 2 physical servers with pretty good configuration and local storage. I am using Nested Virtualization where I will run two ESXi Virtual Machines and a Filer to present local storage a shared storage. In total I will have 4 ESXi hosts with shared storage.

Please follow the below steps to configure Nested Virtualization on ESXi 5.5

1. Create a New Virtual Machine using "Web-Client only".

2. During configuration wizard select "Compatible with - ESXi 5.5 and Later".

3. Select Guest OS Family as "Linux" and Guest OS Version as "Other Linux (64-bit)".

4. During Customizing hardware section - Important
    Under CPU - " Check Hardware Virtualization"
    (this option let you power on Virtual Machine inside a Virtual Machine)

5. Set the other resources i.e., Memory, CPU appropriately and complete the Virtual Machine creation.

6. To get the Networking on the nested Virtual Machines, enable "promiscuous mode" for the Virtual Machine portGroup of the ESXi host just installed.

In Web-Client:

>> Select the Host (On which the Virtual Machine was created)
>> Click on Manage >> Virtual Switch and then click on Edit button of   vSwitch.

7. You can also configure VLAN by just setting the VLAN to 4095. Also make sure setting are also modified on the physical switch accordingly          (access/trunk for VLAN 4095).

Nested Virtualization can be further extended and you can have next level of Virtualization on top of second layer and so on like the movie Inception, dream inside a dream. This feature is amazing to test all the vSphere features as well as most of the VMware products on one or two high configuration physical server. Hope this post was helpful.