We have a couple of XEN servers (details about the install are from here). Recently one of them started rebooting for no good reason. I decided that upgrading the server to the newest bits from CentOS and running that for awhile to see if everything cleans up. Sounds simple but it isn’t.
- First you need to upgrade the host system. I just ran
yum check-updatefollowed by a
yum update. Tons of packages were upgraded including the kernel.
- I stopped any guest VMs from starting automatically, then I cleanly shut down all of my guest VMs.
- Check /boot/grub/menu.lst to make sure you are booting the new kernel
- I rebooted
- Like the install, a new initrd file should be created. I used this command to do mine:
mkinitrd -f --with=xennet --builtin=aic7xxx --builtin=serverworks --preload=xenblk --omit-raid-modules /boot/initrd-2.6.18-92.1.22.el5xen.img 2.6.18-92.1.22.el5xenThis creates a new initrd the guest systems can use. Note the kernel version. This can be gotten with uname.
- Then I rebooted again to use the new initrd.
- After the system came up, I needed to make a couple of changes to the guest images
- One change is in the image file itself. It needs the new modules in /lib. I use XEN image files rather than partitions, so I am able to mount the image file with a command like:
mount -o loop /var/lib/xen/images/guest123.img /mnt
- I copied the two /lib/modules directories to the image. In this case they are 2.6.18-92.1.22.el5 and 2.6.18-92.1.22.el5xen. Then I unmounted the image.
- Next I needed to modify the XEN config file for that image. For me it was located as /etc/xen/guest123
- I removed the kernel, ramdisk, and vif lines from that file and added these to match my system:
- Then I started the guest image and made sure it booted without any problems. The big thing to check is network. The updated vif line allows the network to keep working.
I have three other XEN servers that probably should be updated as well. That will happen sometime in the next couple of weeks and if the notes change I will update them accordingly.