My Xen experience

No! When I Xen, I am not talking about a relationship to foreign material. Well, that is – not exactly. Xen is an open source hypervisor. Think: VMware, but much, much cooler.

I was talking to Tim Post, about a project that I was completing for ShareSource2. Basically, the conversation came to the point where I said that I was using OpenVZ for my server virtualization. Tim then came to me and said “Why don’t you just use Xen”.

Well, I was not born yesterday – I did tell him that I had tried Xen, and that when I tried it – it just refused to work.

Then Tim pointed me to Xen unstable, a mercurial repository containing a version of Xen that does not need a new CPU to actually boot up.

Xen unstable, the version I checked out yesterday, is actually tagged as being “3.2.0-rc4″, which probably means that it is coming it’s way to becoming a nice stable Xen product that people other then me have actually been able to use.

This is what I used on my Debian to be able to install a Xen-enabled kernel:

~# mkdir Xen
~# cd Xen
~# hg clone http://xenbits.xensource.com/xen-unstable.hg
[[ wait for around 3 minutes while it grabs Xen’s history
~# cd xen-unstable.hg
~# apt-get install bin86 bcc
~# make world
[[ Note: this step will also check out a 2.6.18.8-xen kernel ]]
~# sudo make install

Then I had to add an entry to my /boot/grub/menu.lst which looked like this:

title Xen 3.2 / XenLinux 2.6
kernel /boot/xen-3.gz console=vga
module /boot/vmlinuz-2.6.18.8-xen root=UUID=66559e96-e405-4a1d-be28-b8caf5b5b89d ro console=tty0
module /boot/initrd-2.6.18.8-xen.img

Reboot, select my new kernel, and faster then you can say “WOW IT WORKS” it was booting me into a brand new (well, actually, my OpenVZ kernel was 2.6.20 – so a brand old) kernel

To try Xen out, just go over to http://jailtime.org and download an image of a nice operating system (I chose CentOS 5.1). When you have downloaded your image, do the following:

tar -xvf {downloaded image name}
ls -lar
xen create -c {smallest file (usually)}

and Voila! First thing you should be introduced to is a nice Grub screen welcoming you to your Xen experience.

I am still as of today yet to actually have built my own Archlinux or Frugalware Xen image. If anyone knows how to do this successfully, please drop me a line or leave a comment!

Leave a Comment

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