XAPI Ubuntu PV
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 must have built-in support for Xen. If the guest was run as HVM (more like VMware), this means the full system hardware is emulated and the guest doesn't need any special kernel support capabilities. 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. Note there's a difference between a kernel supporting being a domU (guest) vs a dom0 (host). Ubuntu 10.04 supports domU natively, 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:
export UUID=MYUUID #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:
export UUID=MYUUID #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"