Installation on lenny

lenny or 5.0 is an old stable Debian release. It will cease to receive security or any other kind of support in 2012. If you're installing new machines, don't install lenny, install squeeze (see above)!

This information is preserved only for completeness.

The short story is the following:

  1. Install Lenny. Finish the installation as you would normally do
  2. apt-get install install xen
  3. apt-get install xen-utils
  4. apt-get install xen-tools
  5. install a xen dom0-capable kernel
  6. reboot into xen
  7. create your domains
  8. manage your domains

Dom0 (host)

After you are done installing the base OS, xen-utils and xen-tools, you will need to install a xen-capable dom0 kernel. The kernel is 2.6.26, the -xen variant contains patches from SuSE for dom0 support.

The xen-linux-system packages of interest are (Install the correct one for your architecture):

Serial console access

To get output from grub, XEN, the kernel and getty (login prompt) via both vga and serial console to work, here's an example of the right settings when using Lenny kernels and Xen 3.2:

In /boot/grub/menu.lst:

serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1
terminal --timeout=5 serial console
[...]
title           Xen 3.2-1-amd64 / Debian GNU/Linux, kernel 2.6.26-2-xen-amd64
root            (hd0,0)
kernel          /boot/xen-3.2-1-amd64.gz com1=9600,8n1 console=com1,vga
module          /boot/vmlinuz-2.6.26-2-xen-amd64 root=/dev/md0 ro console=tty0 console=hvc0
module          /boot/initrd.img-2.6.26-2-xen-amd64

In contrast to the Etch configuration, there's no ttyS0 in the vmlinuz line!

In /etc/inittab you need at least these lines:

1:2345:respawn:/sbin/getty 38400 hvc0
2:23:respawn:/sbin/getty 38400 tty1
# NO getty on ttyS0!

The tty1 will show up at the vga output, and the hvc0 will show up at the serial console.

DomU (guests)

The Lenny Debian Installer fully supports installation of 32 bit guests under Xen using the netboot/xen variant. Images are available on any Debian mirror in the installer directory and contain a kernel, installer ramdisk and an example Xen configuration file. To install, fetch the xm-debian.cfg configuration file, edit to suit your tastes, and start the guest with the install=true option plus an optional (but strongly recommended) install-mirror=ftp://ftp.XX.debian.org/debian.

xm create -c xm-debian.cfg install=true install-mirror=ftp://ftp.XX.debian.org/debian

Newer images are also available from the daily builds. After grabbing the xm-debian.cfg configuration file and editing it to suit your tastes, start the guest with an additional install-installer=http://people.debian.org/~joeyh/d-i/images/daily/ to manually direct it to the daily builds:

WARNING, if you do not change the hard disks option on xm-debian.cfg this WILL overwrite your dom0 instead of installing to your domU. YOUR MACHINE WILL BE DESTROYED.

xm create -c xm-debian.cfg install=true \
  install-mirror=ftp://ftp.XX.debian.org/debian \
  install-installer=http://people.debian.org/~joeyh/d-i/images/daily/

See the comments in the configuration file for additional installation options.

Another way of creating a lenny domU is the following:

xen-create-image --hostname=vanila --size=8Gb --dist=lenny --memory=512M --ide --dhcp

Please note that the --dir option may be required, and it specified the directory where it will store your disk images. If you wish to specify a fixed ip address, use the --ip xxx.xxx.xxx.xxx instead of --dhcp option.

Once the guest is installed simply boot it using:

xm create -c xm-debian.cfg

Lenny only includes 32 bit (PAE) kernel support which means there is no installer support for 64 bit guests. You could continue to use the Etch kernels or obtain a newer upstream kernel which supports 64 bit operation (2.6.27+).

In addition to installing via Debian Installer xen-tools can also create a Lenny domU as described below.

The default Lenny kernel is the newer paravirt_ops version (2.6.26), which does not function as a dom0 (except for the -xen variants, which have dom0 support but also some issues running as domU (please clarify?). It will also not support PCI passthrough in a domU. For PCI passthrough, you have to either:

In Lenny the distinction between the Xen and non-Xen flavours of the kernel (with respect to domU support) is no longer present. The Debian Installer will install the -686-bigmem flavour.

Notes on kernel version compatibility