PyGrub
Contents |
Description
PyGrub enables you to start Linux DomUs with the kernels that lie in the filesystem of the DomU instead of with a Kernel that lies in the filesystem of the Dom0. This enables easier kernel update from DomU.
Example Template Preparation
These examples were taken from sources across the internet. Both of these examples worked for us, however they have only been tested in our development environment and we can't guarantee they will work for you.
CentOS
Inside the CentOS domU (Virtual Server)
yum install kernel-xen grub -y ln -s /boot/grub/grub.conf /boot/grub/menu.lst
Once thats done you need to check the menu.lst and make sure it matches the kernel files inside /boot:
#ls -l /boot total 7276 -rw-r--r-- 1 root root 1209395 Jul 1 20:08 System.map-2.6.18-194.8.1.el5xen -rw-r--r-- 1 root root 66552 Jul 1 20:08 config-2.6.18-194.8.1.el5xen drwxr-xr-x 2 root root 4096 Jul 14 10:39 grub -rw------- 1 root root 2495715 Jul 14 10:38 initrd-2.6.18-194.8.1.el5xen.img -rw-r--r-- 1 root root 80032 Mar 16 2009 message -rw-r--r-- 1 root root 112259 Jul 1 20:09 symvers-2.6.18-194.8.1.el5xen.gz -rw-r--r-- 1 root root 2047941 Jul 1 20:08 vmlinuz-2.6.18-194.8.1.el5xen -rwxr-xr-x 1 root root 969816 Jul 1 20:56 xen-syms-2.6.18-194.8.1.el5 -rw-r--r-- 1 root root 417433 Jul 1 18:58 xen.gz-2.6.18-194.8.1.el5 #cat /boot/grub/menu.lst default=0 timeout=10 title vmlinuz-2.6.18-194.8.1.el5xen root (hd0,1) kernel /boot/vmlinuz-2.6.18-194.8.1.el5xen console=xvc0 root=/dev/sda1 ro initrd /boot/initrd-2.6.18-194.8.1.el5xen.img
Thats it! the vps is set to use it's own kernel.
Debian
Inside the Debian domU (Virtual Server)
aptitude install linux-image-2.6-xen-amd64 grub mkdir /boot/grub echo "(hd0) /dev/sda" > /boot/grub/device.map mknod /dev/sda b 202 0 update-grub
In domU's /etc/inittab you should look for the line with "xvc0" and just replace the "xvc0" with "hvc0"
Thats it! the vps is set to use it's own kernel.