Citrix made its Distributed virtual switch controller (DVSC) publicly available about a year or so ago,  at the same time they announced it was being deprecated.   This was bitter sweet.   Home labs now had access to this technology previously only available to corporations with deep pockets.  However,  it came with a promise that pretty soon DVSC will be irrelevant.  Fast forward a year, with the release of the new Citrix Xenserver tech preview named Creedence,  Citrix is rescinding their deprecation on the Distributed virtual switch controller!

So how does this all fit in with this post?

Well Xenserver has some pretty amazing virtual networking when you add the DVSC in the mix.  I wont get into all those details however a good starting point on what the DVSC brings to the table is here.  The feature I find most useful is the Cross Server private Networking.   In short, when you create a CSPN, Xenserver creates a gre tunnel between all the hosts in your Xenserver pool,  providing you with a fully isolated layer 2 network. There is no need to create a vlan on any of your switches,  you do not need a vlan switch, managed switch or special hardware at all, it just works! To these isolated layer 2 networks you can connect your own virtual router, dhcp server, whatever you like. Which is what brings us to this post.

I have mentioned before how undervalued I believe Citrix Xenserver is, I base my opinion,  partially on the availability of virtual appliances specific to Citrix Xenserver. They just aren’t out there.. anywhere.  The argument that Xenserver is compatible with the .ova format which allows it to use virtual appliances made for other platforms just doesn’t hold water.  If everyone was using Citrix Xenserver there would be appliances for “Citrix Xenserver”.

So, we have to make our own.  This is not as trivial as you may think.  Xenserver vm’s if created with the “Other” template, (which is what you want when making an appliance because it is what gives full hardware virtualization and not paravirtualization) by default perform under par, mainly the network interfaces run at 100mbs.  For me this is a major drawback.  I have searched high and low for a good virtual router to use that I can add Xenserver tools to, to get the better performance.  I have found two excellent solutions.   I will share the first here and the second in a upcoming post (next few days, I promise).

 

Lets get dirty!

As the title says, we will use ClearOS, it provides (for free) a community edition that performs excellent. Let’s download the iso from here.

Make sure you download the .iso the pre-built appliances are for testing only and actually do not even install.

Next, create a virtual machine in Citrix Xenserver and use the “Other” template. This will give you a hardware virtualized machine.

Other-Template-CXS

Choose at least two network interfaces for your virtual machine. I usually add the first vnic to my external network (has a dhcp server running on it) and use it as the wan side. I then add the second vnic on a fresh new Cross Server Private Network, it can also be a vlan network or a host only network.

The vm does not need much in resources, 6gb hard disk, 1 vcpu and 512mb ram work well for a small lab.

There is a little trick to get the vm to work, we will use it here.

First lets find the uuid of the newly created vm.

On the pool master, either ssh to it, or from the console in Xenserver type:

xe vm-list

Look for the name of your ClearOS vm and copy its uuid to use in the next step.

 

Next lets turn off viridian for the ClearOS virtual machine which is on by default for all HVM vm’s and sometimes confuses Linux operating systems (Viridian is used for Windows, which is not applicable here)

xe vm-param-set uuid=the-uuid-from-previous-step platform:viridian=false

 

Now boot the vm and follow the onscreen instructions to install the operating system. This is pretty straight forward.

When installation is finished, Click Ok, to reboot. You may have to eject the cd when the reboot is done if ClearOS does not eject the disk for you.

Voila! You should boot into the ClearOS welcome screen and it should tell you the ip address to go to from your web browser to configure it.

The ip is usually https://server-ip:81

Now, we need to install xenserver tools to get gigabit speed.

Right-Click the vm and select “Install Xenserver Tools” or just select the xs-tools.iso from the virtual cdrom.

Use your favorite ssh client (like Putty) and ssh to the ip address on the welcome screen. Log in as root and use the password you set during the installation. (ssh is allowed on the wan interface by default)

mount /dev/cdrom /tmp

Next move into the directory we just mounted

cd /tmp/Linux

Normally at this point you would run the auto install script, however it wont work here,  Xenserver will fail to recognize the version of linux.

No fear, we will do it manually.

First,

rpm -i xe-guest-utilities-xenstore-6.4.93-1269.x86_64.rpm

rpm -i xe-guest-utilities-6.4.93-1269.x86_64.rpm

Make sure you install them in this order! Your version of tools may be diferent. Just install the xe-guest-utilities-xenstore-x.x.xx-xxxx.x86_x.rpm

first, then the xe-guest-utilities-x.x.xx-xxxx.x86_xx.rpm

Next shutdown the vm with:

shutdown -h now

Eject the cd.

Start your vm up again. You can now see the ip address assigned to the Wan interface from Xencenter’s networking tab (lan interface is not configured yet but will also be visible once you set it). Nic speed is now gigabit, your vm can be live migrated, storage migration and all those other goodies.

-Carmine Bufano

 

 

 

 

 

 

 

Aliens? Any thoughts?

This site uses Akismet to reduce spam. Learn how your comment data is processed.