Some more Xen caveats

I just got my server upgraded to Centos 5. CentOS 5 is the best operating system I’ve ever used. However, there are some not so fun issues with it. Specifically, if you want to transfer a xen domain from a previous version. Here’s what you need to know.

Redhat and CentOS do not include the xennet and xenblk drivers in initrd. This means that you will never be able to mount the root device. To fix this, make a new initrd with the command: mkinitrd /boot/initrd-xen-img –with=xennet –preload=xenblk . Make sure to add that file in the ramdisk option of the xen config.

The next trick is a doozy. The console device is no longer /dev/tty0 but is now /dev/console. I had to edit the /etc/inittab files on all of my vm’s to spawn a getty on /dev/console. This is the issue if everything looks good, but the machine won’t display a login. To fix this, either mount the xen disk and do the mods from dom0, or add the line extra = “1” in the cfg file to boot into single user mode and edit the file from there. I see alot of talk about /dev/xvc0 as the console, but haven’t had to use it yet.
Nash-hotplug is a little evil. The process was taking up 100% cpu on my jailtime CentOS 4.4 image. To fix this, I added a killall line to rc.sysinit. I was in rc.sysinit already since udev fails to start now. This isn’t a show stopper since all the needed device nodes were already created. If you need to create the device nodes yourself, try:

cd dev ; /dev/MAKEDEV null zero random urandom console tty pty hda xvd loop

The Debian image faired about the same. I had to fix the console as described above. There was another issue though. An error message with 4gb seg fixup in it kept appearing. The fix for that issue was to move or delete the /lib/tlb directory.

This is too hard for the normal person to figure out. If not for google, I would’ve been down for days.

Related posts:

Tags: