XAPI Ubuntu PV

From Xen
Revision as of 10:46, 28 February 2012 by Angrygreenfrogs (talk | contribs)

These instructions are specific to PV (paravirtual) guests running on XCP. PV means that the guest's kernel is launched directly from XCP and that the kernel has built-in support for Xen. This page is not applicable to HVM guests.

If you're wondering why Ubuntu seems to be OK as a PV guest without doing anything special to the kernel, it's because the Ubuntu kernel shipped with 10.04 (not sure about the other Ubuntu releases) has pvops built-in, which means it was pre-compiled to support being run as a Xen PV guest natively. There's a difference between a kernel supporting being a domU (guest) vs a dom0 (host). Ubuntu 10.04 supports domU natively, but not dom0.

For more information specific to Ubuntu, read here: https://help.ubuntu.com/community/Xen

All of that said, the below is mostly generic to any Linux PV guest.

If you're having trouble booting your Linux (Ubuntu in this case) guest on XCP due to complaints about XCP being unable to locate the kernel, the below may help.

First, if you want to live edit the guest's grub configuration, you can do so:

#list the VM disks
xe vm-disk-list uuid=$UUID
#edit system's live grub
xe-edit-bootloader -n "MYHOSTNAME" -p 1 -f /grub/grub.cfg

Now, assuming you know exactly what the kernel and ramdisk file names are called (e.g. look through the grub config as above), you can tell XCP exactly which image to use to boot your system.

Replace the examples below with your actual kernel/ramdisk:

#just in case, save the current values
xe vm-param-get uuid=$UUID param-name=PV-bootloader-args
xe vm-param-get uuid=$UUID param-name=PV-args
# set the correct kernel image, init image, and root device per your specific machine
xe vm-param-set uuid=$UUID PV-bootloader-args="--kernel=/vmlinuz-MYKERNEL --ramdisk=/initrd.img-MYKERNEL"
xe vm-param-set uuid=$UUID PV-args="root=/dev/MYROOTDISK-root ro quiet"