28.5. Wrong kernel image error - using a non kernel-xen kernel in a para-virtualized guest
If you try to boot a non kernel-xen kernel as a para-virtualized guest the following error message appears:
# xm create testVM
Using config file "./testVM".
Going to boot Red Hat Enterprise Linux Server (2.6.18-1.2839.el5)
kernel: /vmlinuz-2.6.18-1.2839.el5
initrd: /initrd-2.6.18-1.2839.el5.img
Error: (22, 'Invalid argument')
In the above error you can see that the kernel line shows that it's trying to boot a non-xen kernel. The correct entry in the example is ”
kernel: /vmlinuz-2.6.18-1.2839.el5xen
”.
The solution is to verify you have indeed installed a kernel-xen in your guest and it is the default kernel to boot in your /etc/grub.conf
configuration file.
If you do have a kernel-xen installed in your guest you can start your guest using the command “xm create -c GuestName
” where GuestName is the name of the kernel-xen. The previous command will present you with the
Grub
boot loader screen and allow you to select the kernel to boot. You will have to choose the kernel-xen kernel to boot. Once the guest has completed the boot process you can log into the guest and edit /etc/grub.conf
to change the default boot kernel to your kernel-xen. Simply change the line “default=X
” (where X is a number starting at '0
') to correspond to the entry with your kernel-xen line. The numbering starts at '0
' so if your kernel-xen entry is the second entry you would enter '1
' as the default,for example “default=1
”.