Where was I?

Had another job to do but I’m back again. I’m in the process of trying to compile xen-4.0.0 on my fresh install of Ubuntu 10.04 LTS. Downloaded and extracted the source code and started on the README file, as you do. This time I have taken much more care to ensure I have the pre-requisites listed. Mind you, this is a bit of an art in itself…asking for a development install of x11 translates into which packages exactly?

I’ve been using the Synaptic Package Manager on Ubuntu and it’s built-in search function to make educated guesses about what was required. I have saved the log file of what I chose, to be thorough.

So continuing with a “make world” trundles along for a while before failing because of /bin/sh: git: not found. This is an easy fix by installing git-core package. Guess the README missed that one.

After it’s done all it’s git stuff it stops again, this time with the prompt

Enable support for Xen PCI passthrough devices (XEN_PCI_PASSTHROUGH) [N/y/?] (NEW).

Lets give that a whirl, and the next one

Paravirtualization layer for spinlocks (PARAVIRT_SPINLOCKS) [N/y/?] (NEW)

followed by

Xen PCI Frontend (XEN_PCIDEV_FRONTEND) [N/m/y/?] (NEW)

I’m typing these in as they crop up. How many more I wonder? Makefile must be slightly out of date.

SCSI tape drive support for Smart Array 5xxx (CISS_SCSI_TAPE) [N/y/?] (NEW)
Fusion MPT ScsiHost drivers for FC (FUSION_FC) [N/m/y/?] (NEW)
Maximum number of scatter gather entries (16-128) (FUSION_MAX_SGE) [128] (NEW)
Fusion MPT misc device (ioctl) driver (FUSION_CTL) [N/m/y/?] (NEW)
Fusion MPT logging facility (FUSION_LOGGING) [N/y/?] (NEW)
Net channel 2 support (XEN_NETCHANNEL2) [N/m/y/?] (NEW)

OK, this is getting tedious, skip the rest except to say I chose Virtual PCI for the backend.

The next error is

*** check_uuid_devel FAILED: missing uuid headers (package uuid-dev)

which doesn’t stop it in it’s tracks swiftly followed by

*** check_xgettext FAILED: can't find xgettext

shortly after which it stops.

Both the above easy to rectify by installed uuid-dev package and gettext package. More minus points for the README file.

I’ve re-typed make at this point (not make world because I don’t want to answer all those questions again). Soon falls over again though in the firmware section with

Require dev86 rpm or bin86 & bcc debs version >= 0.16.14 to build firmware!

That can be fixed by installing the bcc package and it’s dependency.

Next stop, need to Download and install Intel ACPI CA

Which is fixed by installing the iasl package.

This next one looks a bit more tricky. All kinds of confusion following from xen/lowlevel/xc/xc.c:7:20:error: Python.h: No such file or directory

Running a find for Python.h reveals one in /usr/include/python3.1/Python.h. There is a /usr/include/python2.6 directory but there was no Python.h in there. Thanks to Google that is quickly solved by installing the python2.6-dev package.

Next it complains that makeinfo is missing, fixed by installing the texinfo package.

And there at last we seem to have it! Although LateX is required for the documentation, it says.

I started this session at 20:46 and it is now 23:31 so that’s how long it took me to build Xen. Haven’t tested it yet though 🙂

Next step

A quick update. Despite probably not having all the “bits” I continued to try a compilation of Xen 4.0.0 on Darwin. The result of a “make world”, after linking “darwin.mk” to “FreeBSD.mk” was an assembler syntax error in a file called “reloc.c” (copyright Citrix). Will check into that at the next session. Xen expects to be compiled on one of 10 architectures. Darwin is not one of them :-).

Getting Technical

So I had a thought that I should make better use of what I have already, which is to say an iMac running Leopard. It has a 2.4Ghz Dual Core Intel Duo and 2G of Ram so I thought it might be an interesting academic exercise to try and build Xen on it. Not that we’re allowed to run Darwin on top of a hypervisor but should be able to learn something from building Xen at least!

First of all download and unpack Xen 4.0.0. OK, that’s easy. Look at the README file. Hmm a list of pre-requisites, of course. Downloaded the latest gnu compiler but quickly realised I was barking up the wrong tree and dug out my DVDs so I could install Xcode. (I’ve been registered as an Apple developer for a couple of years but never got around to even installing the toolset). Anyway that was easy too and a quick perusal of the Development website left me impressed.

So that has given me GCC and Make but the next on the list is Binutils. A quick google of “binutils darwin” led me to the darwinports website so I downloaded and installed darwin ports. Following the clues (not quite the exact instructions) led to an installation of binutils. Watching “port” work is also impressive. It takes all the frustration/fun out of building software. It goes and gets everything it needs, builds and installs it (after you tell it to update itself).

All went swimmingly until it fell over trying to build “gettext”. Tried it a couple of times to no avail and ended up running the failing command manually which produced masses of output and lots of warnings but did “something”. (Have to have a bit of faith sometimes). A port install of zlib worked fine and a final invocation of “port install binutils” completed OK although I was warned that “Having binutils installed will cause some other ports to fail to build. Consider uninstalling binutils.” Cute. I just installed it.

Back to Xen’s dependencies. Python, tick. Openssl, tick.  x11, tick. curses…looks like another port job.  Too late to look at that now and all the other bits will wait until the next free slot.

Done some reading

Over a hectic bank holiday weekend juggling DIY, childminding and my wife’s business duties (that’s another story) I managed to finish reading both ends of the spectrum: Virtualisation for Dummies and the 2003 Cambridge paper on Xen. Both are quite dated now, the academic paper much more so.

I was hoping to find some useful material in the Dummies guide for potential talks but no such luck.  The Xen paper is interesting, kinda, but is very out of date to the point of historical interest only. In those early days they were following a paravirtualised route and modifying Linux (Xenolinux) and Windows as guests. However they backed the wrong horse really as so much progress was made in hypervisor technology that Vmware became the market leader. Modifying all those guest O/S’s each time there was an update? It was never going to fly.

While I mull over my lab, I will continue to read some academic papers. More up-to-date ones! Based on that I hope to write a summary of the state of the art. Now I know myself that I don’t have a good record of finishing these things (family/work excuses etc. etc.) so I’ll see how I get on.