
La sortie de Debian Squeeze en version stable est pour bientôt, de l'ordre de quelques semaines à quelques mois.
Profitant de cette attente, j'ai mené quelques tests pour le noyau 2.6.32.x pv-ops notamment pour Lenny, toujours considéré comme stable à l'heure de la rédaction de ce billet.
Dans les sources de Xen 4.0.1, une fois toutes les diverses compilations terminées (xen, tools, stubdom, world), le sous-répertoire dist contient le nécessaire pour procéder à une installation. Au niveau "portabilité" (façon de parler, on va dire), en ne gardant que ce répertoire, il est donc possible d'installer Xen sous Lenny
C'est ce que je propose ici. Après avoir compilé correctement le kernel avec les divers supports (tap, tun notamment pour émulation carté réseau pour domU Windows, etc...), on peut donc compresser ce sous-répertoire et le réutiliser.
Il existe bien des backports pour Debian de Xen 4.0 mais comme ce n'est pas ce qui m'intéresse ici.
L'idée de faire un liveCD ne me déplairait pas mais la difficulté actuelle repose sur le module de système de fichier aufs.

Fig 1 - Grub suite à l'installation de Xen 4.0.1 et kernel 2.6.32.24
2 Pré-requis Machine de tests et Debian Lenny
- La machine de test est un simple hp pavillon p6215fr dont le processeur supporte Intel-VT. Il suffira de l'activer ce support dans le BIOS

Fig 2 - Machine de test HP Pavillon p6215fr

Fig 3 - Machine de test HP Pavillon p6215fr
- On installe la Debian Lenny par NetInstall. Lors de l'installation, on ne prendra que que le stricte minimum "Système standard"
3. Installation
3.1 Paquets .deb
Parmi la liste des paquets vraiment utiles, je ne me suis pas vraiment attardé sur ceux qu'il faut garder ou pas. J'ai tout pris sauf tout ce qui fait allusion à LATEX.
apt-get install -y bcc bin86 gawk bridge-utils iproute libcurl3 libcurl4-openssl-dev bzip2 module-init-tools transfig tgif \
pciutils-dev mercurial build-essential make gcc libc6-dev zlib1g-dev python python-dev python-twisted libncurses5-dev patch \
libvncserver-dev libsdl-dev libjpeg62-dev iasl libbz2-dev e2fslibs-dev git-core uuid-dev ocaml libx11-dev \
debootstrap libtext-template-perl libconfig-inifiles-perl libfile-slurp-perl
3.2 Xen, Noyau 2.6.32.24
melina:~#wget -q http://www.davidgis.fr/download/xen-4.0.1_linux-2.6.32.24_build_v2.tar.bz2
melina:~#tar xjf xen-4.0.1_linux-2.6.32.24_build_v2.tar.bz2
melina:~#cd dist/
melina:~/dist# ./install.sh
Installing Xen from './install' to '/'...
- installing for udev-based system
- modifying permissions
All done.
Checking to see whether prerequisite tools are installed...
Xen CHECK-INSTALL dimanche 31 octobre 2010, 01:37:52 (UTC+0200)
Checking check_brctl: OK
Checking check_crypto_lib: OK
Checking check_curl: unused, OK
Checking check_iproute: OK
Checking check_python: OK
Checking check_python_xml: OK
Checking check_udev: /sbin/udevadm
OK
Checking check_xml2: unused, OK
Checking check_zlib_lib: OK
All done.
On active ensuite les services pour
xend et
xendomains
melina:~# update-rc.d xend defaults 20 21
Adding system startup for /etc/init.d/xend ...
/etc/rc0.d/K21xend -> ../init.d/xend
/etc/rc1.d/K21xend -> ../init.d/xend
/etc/rc6.d/K21xend -> ../init.d/xend
/etc/rc2.d/S20xend -> ../init.d/xend
/etc/rc3.d/S20xend -> ../init.d/xend
/etc/rc4.d/S20xend -> ../init.d/xend
/etc/rc5.d/S20xend -> ../init.d/xend
melina:~#update-rc.d xendomains defaults 21 20
Adding system startup for /etc/init.d/xendomains ...
/etc/rc0.d/K20xendomains -> ../init.d/xendomains
/etc/rc1.d/K20xendomains -> ../init.d/xendomains
/etc/rc6.d/K20xendomains -> ../init.d/xendomains
/etc/rc2.d/S21xendomains -> ../init.d/xendomains
/etc/rc3.d/S21xendomains -> ../init.d/xendomains
/etc/rc4.d/S21xendomains -> ../init.d/xendomains
/etc/rc5.d/S21xendomains -> ../init.d/xendomains
3.3 Xen-tools
Pour la construction de nos futures domU, on installe xen-tools 4.2
wget -q http://xen-tools.noone.org/software/xen-tools/xen-tools-4.2.tar.gz
tar xvf xen-tools-4.2.tar.gz
cd xen-tools-4.2
make install
3.4 Renouvellement de l'initrd et mise à jour pour Grub
melina:~# mkinitramfs -o /boot/initrd.img-2.6.32.24 2.6.32.24
melina:~# update-grub
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found Xen hypervisor 4.0.1, kernel: /boot/vmlinuz-2.6.32.24
Found kernel: /boot/vmlinuz-2.6.32.24
Found kernel: /boot/vmlinuz-2.6.26-2-686
Updating /boot/grub/menu.lst ... done