If you're running XenServer 5.6+, there is a much simpler process.
Installing Ubuntu Server 10.04 (32bit and 64bit) LTS.
_
How to get Ubuntu 10.04 installed on Citrix XenServer 5.5 Update 2, using PV instead of HVM.
Due to Grub2 and ext4, Xen can't boot Ubuntu using PV.
Some places say to modify pygrub and GrubConf.py via patches; but from experience this has resulted in failure on our XS setup. This means each VM must be told what to boot via parameters set via the xe command-line tool.
sudo cp /etc/init/tty1.conf /etc/init/hvc0.conf sudo nano /etc/init/hvc0.conf
linux /boot/vmlinuz-2.6.32-21-server root=UUID=c49dc1b4-3f20-409e-a757-2158bc52ff4b ro quiet initrd /boot/initrd.img-2.6.32-21-server
sudo apt-get -y install bash && sudo dpkg-reconfigure dash
sudo mount /dev/cdrom1 /mnt/ sudo dpkg -i /mnt/Linux/xe-guest-utilities_5.5.0-466_amd64.deb
sudo update-rc.d -f xe-linux-distribution remove sudo update-rc.d xe-linux-distribution defaults
#!/bin/bash confirm() { echo -n "$1 OK [Y/n]?" read ANSWER if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ] || [ -z "$ANSWER" ] then eval $1 echo "...parameter set" else echo "...parameter NOT set" fi } if [ -z $1 ] then echo -n "Name of VM [l for list]: " read VM else VM=$1 fi if [ "$VM" == "l" ] || [ "$VM" == "L" ] then xe vm-list | grep name-label | grep -v "Control domain" exit fi echo "" echo "Looking up UUID for VM $VM" UUID=$(xe vm-list name-label=$VM params=uuid --minimal) if [ -z $UUID ] then echo "No UUID found for $VM." exit 0 fi echo "" echo "UUID=$UUID" echo "" echo "Setting parameters for VM $VM" confirm "xe vm-param-set uuid=$UUID HVM-boot-policy=" confirm "xe vm-param-set uuid=$UUID PV-bootloader=pygrub" echo "" echo -n "Specify path to Kernel (e.g. /boot/vmlinuz...): " read KERNEL_PATH echo "" echo -n "Specify Kernel arguments (root=UUID=... ro quiet): " read KERNEL_ARGS echo "" echo -n "Specify path to ramdisk (e.g. /boot/initrd...): " read RAMDISK_PATH echo "" confirm "xe vm-param-set uuid=$UUID PV-bootloader-args=\"--kernel=$KERNEL_PATH --ramdisk=$RAMDISK_PATH\"" echo "" confirm "xe vm-param-set uuid=$UUID PV-args=\"$KERNEL_ARGS console=hvc0 xencons=hvc0\"" echo "" echo "List of discs for VM $VM" xe vm-disk-list uuid=$UUID echo "" echo "Looking up UUID for VBD of VM $VM" VBD=$(xe vm-disk-list uuid=$UUID | grep -A1 VBD | tail -n 1 | cut -f2 -d: | sed "s/ *//g") if [ -z $VBD ] then echo "No VBD UUID found for $VBD." exit 0 fi echo "VBD UUID=$VBD" echo "" echo "Setting parameters for VBD $VBD" confirm "xe vbd-param-set uuid=$VBD bootable=true" exit 0