Xen on Ubuntu

From ConShell
Jump to: navigation, search

First, see this page:

The instructions above are for 3.0.1, so in addition to following the instructions I made the following adjustments for 3.0.3_0...

wget http://bits.xensource.com/oss-xen/release/3.0.3-0/bin.tgz/xen-3.0.3_0-install-x86_32.tgz
tar xvzf xen-3.0.3_0-install-x86_32.tgz
cd dist
./install.sh
/sbin/depmod -a 2.6.16.29-xen
echo "loop max_loop=64" >> /etc/mkinitramfs/modules
cd /boot
mkinitramfs -o initrd.img-2.6.16.29-xen 2.6.16.29-xen

Edit grub menu.lst putting this as entry 0...

title Xen 3.0 / XenLinux 2.6
kernel /boot/xen-3.gz dom0_mem=128000
module /boot/vmlinuz-2.6-xen root=/dev/hda1 ro
module /boot/initrd.img-2.6.16.29-xen

Note that the dom0_mem arg to the kernel is not something you'll want to miss.


Everything below here was unfruitful...a waste of time

OK I'm installing xen-3.0.2-2 on Ubuntu (Dapper Drake) at home. The box is a meager Dell Dimension 4300S with 256 MB RAM but I'll ad more RAM if I can get this working.

I'm mosting following the instructions for Xen 3.0.x on Debian Sarge and I'll just note any delta here.

After installing the pre-requisites and downloading, extracting the source for xen-3.0.2-2 I get a bunch of warnings and ultimately a failure when trying the make world.

...
xen/lowlevel/xc/xc.c:1249: warning: assignment makes pointer from integer without a cast
xen/lowlevel/xc/xc.c:1252: warning: implicit declaration of function ‘setbuf’
xen/lowlevel/xc/xc.c:1252: error: ‘stdout’ undeclared (first use in this function)
xen/lowlevel/xc/xc.c:1253: error: ‘stderr’ undeclared (first use in this function)
xen/lowlevel/xc/xc.c:1256: warning: implicit declaration of function ‘PyModule_AddObject’
xen/lowlevel/xc/xc.c:1256: error: syntax error before ‘)’ token
error: command 'gcc' failed with exit status 1
make[3]: *** [build] Error 1
make[3]: Leaving directory `/usr/src/xen-3.0.2-2/tools/python'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/usr/src/xen-3.0.2-2/tools'
make[1]: *** [install-tools] Error 2
make[1]: Leaving directory `/usr/src/xen-3.0.2-2'
make: *** [world] Error 2

This got me thinking first about my python pre-reqs and what I might be missing... but then I recalled seeing some complains on the xen-users mailing list about gcc4 not working to build xen. Sure enough that looks like the problem.

root@turing:/usr/src/xen-3.0.2-2# gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr 
--enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug  
--enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre  
--enable-mpfr --disable-werror --with-tune=pentium4 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)

So I proceed to install gcc3 (gcc-3.4 actually) and pick up where I left off.

aptitude install gcc-3.4
export CC=/usr/bin/gcc-3.4
make world

(Left off here)