Installing Nested XenServer on ESXi 5.1

If you are running the free version of ESXi 5.1 and want to try running nested XenServer hypervisors as vms, please read on!

If you are running a home lab with a limited number of physical servers and resources, then the free version of ESXi 5.1 is a pretty good choice for hypervisor.  I chose it as my hypervisor at home because it gives me memory ballooning (that’s over-provisioning of memory) in the free edition, which XenServer does not  This lets me allocate more memory to vms than I actually have in my physical server.  Note:  it looks like the free version of XenServer 6.2 now offers this, so you might want to think about that.

So, now that you have chosen ESXi 5.1 as your host, but still want to mess about with the excellent Xen hypervisor, here’s how you can do it.

I am assuming here that you already have an ESXi server stood up and that it is indeed version 5.1.  5.1 makes it a bit easier to virtualize other hypervisors, so you want to be using that instead of previous versions.

I am using XenServer 6.1, but 6.2 should work just as well.

Enable Promiscuous Mode on your vSwitches

In the vSphere client, click on your ESXi host, Configuration tab => Networking => Properties of the vSwitch that contains the virtual network that your Xen vm will be sitting in => Security => Change Promiscuous Mode to “Accept”

promiscuous_mode

Build your XenServer VM and Change the Network Adapter Type

Build this just like you would build any other vm, making sure you boot off the Xen ISO.

For Network Adapter Type choose “E1000.”   It doesn’t appear that XenServer supports the more efficient VMXNet3 adapter.

Do not start the vm!

Edit the VMX File to Enable Virtual Hypervisor Functionality

You only need to do this if you don’t have the vsphere web client, in which case you can do this via the web gui on 5.1. if you are running the free version of esxi 5.1 (without vCenter) then you will need to do it as follows:

SSH into your esxi server, find the vmx file for your Xen VM, edit and insert the following line:

vhv.enable = "true"

save the file and exit.

Note:  your vmx file should be somewhere similar to this:

/vmfs/volumes/51365830-d1e2aede-6353-a0b3cce94c0b/xen/xen.vmx

Now you can start the Xen vm and build it from the ISO.

xen_on_esxi

No VMTools?

One thing I couldn’t get working is the vmtools to be installed on the XenServer vm.  So, if anyone has worked this out, I’d be happy to hear in the comments section below.

Build Xen VMs

Now you should be able to install XenCenter on your pc, connect to the XenServer host and start creating Xen-based vms just like your XenServer was installed on a physical server.  Cool!

 

Advertisements

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