Setting up Ubuntu 10.10 DomU on top of Fedora Xen Dom0 is introduced in this post. The process of setting up Ubuntu 10.10 DomU is the same as Setting Up Stable Xen DomU with Fedora: Unmodified Fedora 12 on top of Xenified Fedora 12 Dom0 with Xen 4.0 This post only show the difference which is specific to Ubuntu and different from Fedora.
Ubuntu installation media
Table of Contents
Unfortunately, the Ubuntu 10.10 Live CD, which is widely used, can’t boot on Xen. We use Ubuntu’s netboot iso image to install Ubuntu. The iso image for Ubuntu 10.10 can be retrieved from:
The file is mini.iso. It can be directly downloaded by wget:
$ wget http://archive.ubuntu.com/ubuntu/dists/maverick/main/installer-amd64/current/images/netboot/mini.iso
Create Xen DomU configuration file
Then we create a configuration file for this Ubuntu Xen DomU. Please be aware that we make some assumption as aforementioned file address (the disk) and network interface (the vif) here. The ubuntu-install.run file’s content:
name="10.1.1.228" vcpus=2 memory=2048 vif=['bridge=eth2'] disk = ['file:/home/xen/mini.iso,xvdc:cdrom,r', 'phy:vg_xen/vm-10.1.1.228,xvda,w'] bootloader="/usr/bin/pygrub" on_reboot='restart' on_crash='restart'
Start Ubuntu Xen DomU and start installation
We can start the DomU now by:
# xm create -c ./ubuntu-install.run
The command line installation interface will appear. We can install Ubuntu 10.10 step by step just following the wizard.
To start the Ubuntu DomU is similar to start the Fedora DomU. Remember to remote the virtual cdrom from “disk” in the configuration file.
As pygrub doesn’t support Ubuntu 10.10 well, we copy the kernel and ramdisk out from Ubuntu’s /boot/ directory to Dom0’s directory and provide DomU the kernel and ramdisk from Dom0’s directory. Please also be aware that Ubuntu requires the ‘root=UUID=…’ kernel parameter. This UUID can also be got from /root/grub/grub.cfg in DomU’s disk. We can simply mount DomU’s disk to Dom0 and get the files and UUID.
This is the configuration file that works well in our cluster:
name="10.1.1.228" vcpus=2 memory=1024 vif=['bridge=eth2'] kernel="/home/xen/vm-10.1.1.228/vmlinuz-2.6.35-28-generic" ramdisk="/home/xen/vm-10.1.1.228/initrd.img-2.6.35-28-generic" extra='root=UUID=4412ceeb-2c40-452f-82e2-8ddbaca681a9' disk = ['phy:vg_xen/vm-10.1.1.228,xvda,w'] on_reboot='restart' on_crash='restart'
Last, enjoy it! More posts on Xen is in Xen Solutions.