In the ComodIT project, every ways to boot virtual machines using OpenStack are tested. It happens that one of these methods is only available using VMs hypervised with XenServer. A documentation explains how to install and configure OpenStack in a Ubuntu DomU to control a Dom0 XenServer. However, this DomU have to run in paravirtualized (PV) mode rather than in hardware virtualization (HVM) mode.
Such a conversion from HVM to PV isn’t trivial, especially for the Oneiric release. This article explains how to convert a Ubuntu 11.10 DomU to PV using XenServer 6.0.
sudo apt-get install openssh-server
sudo cp /etc/init/tty1.conf /etc/init/hvc0.conf
sudo vi /etc/init/hvc0.conf
cat /boot/grub/grub.cfg
[...]
menuentry 'Ubuntu, avec Linux 3.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 51a2ba97-2521-44d7-9b08-316b7059db89
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=51a2ba97-2521-44d7-9b08-316b7059db89 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-12-generic
}
[...]
sudo echo "xen-blkfront" >> /etc/initramfs-tools/modules
sudo update-initramfs -u
ssh root@<XenServer>
xe vm-list
/boot/vmlinuz-3.0.0-12-generic
),root=UUID=51a2ba97-2521-44d7-9b08-316b7059db89 ro quiet splash vt.handoff=7
)/boot/initrd.img-3.0.0-12-generic
)chmod +x makepv.sh
./makepv.sh <vm name> # sans espace
ssh <vm ip address>
sudo mount /dev/cdrom1 /media/cdrom
cd /media/cdrom/Linux
sudo dpkg -i xe-guest-utilities_6.0.0-743_amd64.deb
sudo umount /media/cdrom
sudo init 6
ssh <vm ip address>
sudo update-rc.d -f xe-linux-distribution remove
sudo update-rc.d xe-linux-distribution defaults