Tim's IT Blog

          Thoughts on Technology

Creating a Nested ESXi 5 Environment

Since vSphere 5 was released earlier this year, it is now time to get ready to pass the VCP exam.  I am a VCP for both 3.5 and 4, and decided I would post some updates along the way as I study before taking the VCP 5 exam.

The first thing I did was create a lab environment. I currently use 2 whitebox ESXi 5 servers, attached to iSCSI storage.

However, since I am studying VMware products, I don’t want to configure, and reconfigure these 2 ESXi servers constantly.  Thankfully, I can run Nested ESXi Servers – or, run ESXi 5 inside of ESXi 5.  I can even run 64bit guests inside of my virtualized ESXi servers!  See below:

Now, I can run more than 2 ESXi servers, and blow them away and recreate if needed. (yes, it will be slow).

 

In order to run ESXi 5 inside of ESXi 5, there are a couple of steps we need to do:

First, we will need to add a line to the etc/vmware/config file.  Using SSH to connect to your ESXi server, type the following:

echo ‘vhv.allow = “true” ‘ >> /etc/vmware/config

Next, create a VM for each ESXi host with 2CPUs, and at least 4GB of RAM. When creating the VM, make sure that it is version 8 HW, and that for the operating system you choose “other” and select “Other (64 bit)”.  Once the VM is created, we will choose to edit it’s settings.  In the Options tab, you can now change the OS to “VMware ESXi 5.x”

Last, we need to make sure that under “CPUID Mask” that we expose the NX/XD Flag to the guest if it is not already.

Now, you can power on the VM, and install ESXi 5 from an ISO image.

Once installed, you can then create 64bit guests inside of your virtual ESXi server.

 

 VMware Workstation 8

The best thing about VMware, is I can also virtualize ESXi inside VMware Workstation!  So on my laptop, in VMware Workstation, I can run multiple ESXi servers, that in turn have VMs inside them.  Even better is the fact that I can have 64bit guests inside my ESXi servers running inside VMware Workstation.  Sounds confusing as I type, so here’s a diagram:

In order to run ESXi inside VMware workstation, we simply need to select “VMware ESXi 5″ as the operation system of the guest VM we are creating.

Then, Edit the VM’s Settings, and under the Hardware tab, and processors, check the box to Virtualize Intel VT.

The option to run ESXi inside of VMware workstation is great, especially for when you don’t have a lot of physical hardware to test with.

 

 

  

Tags: , , , ,

7 Responses to “Creating a Nested ESXi 5 Environment”

  • Ilya says:

    Nice. Can it help to overcome some ESXi free version limitations? ;)

  • Adam says:

    “Longmode is disabled for this virtual machine.”

    I could use some expertise here. I’ve verified my CPU supports longmode, 64 bit, VT/ExecuteDisabled (enabled in BIOS).

    Added vhv.allow = “true” to ESXi host config and verified–rebooted Esxi too.

    ESXi 5 installs fine on Workstation 8. When I attempt to install server 2008 64-bit I get the message above “longmode…”

    My only thought at this point is perhaps I need to add the same “vhv.allow” command to the ESXi guest OS.

    Any ideas?

    • Tim says:

      Under the Virtual Machine settings, select “Processors”. On the right, under “Virtualization Engine”, make sure and check “Virtualize VT-x…………..”

      That should resolve the problem of your ESXi guests.

  • [...] 1.) Lab time, lots and lots of lab time. I can’t stress this one enough. If you have a half resonable desktop PC, or even a laptop then you can easily build your own lab using VMware workstation. I reccomend at least 12GB of RAM preffreibbly more. Alternativly save the RAM the OS would use and build your lab in a nested ESXi environment. For help see here: http://tsmith.co/2011/creating-a-nested-esxi-5-environment/ [...]

  • Vikram says:

    Hey…I done this…it works fine…but i want to test HA & DRS, can u pls suggest the best guest OS to run on nested ESXi5, as other OS took long time install and operate…Thanks

    • Tim says:

      Vikram,

      I usually run Server 2008 R2 for all my Windows VMs. I’m assuming this is what you are asking – but I am not sure what you mean by “Other OS took long time to install”. Are you choosing “Other OS” for your guest operating system during the new VM creation wizard, and then installing Windows or Linux? If so, make sure to choose the OS from the Create new VM wizard – however, this will not decrease the time it takes to install by much.


Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>