Home > Uncategorized > CentOS 5.2 under Xen

CentOS 5.2 under Xen

If the following are true:

  • You have a working Xen Dom0 instance
  • You have downloaded the CentOS 5.2 image from jailtime.org
  • You can’t get the image to boot up as a DomU instance because of missing directories such as /dev and /proc

Then you might be interested in knowing that the jailtime images expect certain Xen modules to be preloaded in the ramdisk. So run something like this on your Dom0:

mkinitrd -v -f --with=ext3 --preload=xenblk --with=xennet /boot/initrd-2.6.18-92.1.6.el5xen-xenblk.img 2.6.18-92.1.6.el5xen

Note that I added “-xenblk” to the ramdisk filename to distinguish it from the standard Dom0 file that came with my distro.

Then put the resulting .img in your ramdisk= field in your Xen config file, and believe it or not, it will work. Here’s my complete .cfg:

kernel = "/boot/vmlinuz-2.6.18-92.1.6.el5xen"
ramdisk = "/boot/initrd-2.6.18-92.1.6.el5xen-xenblk.img"
memory = 256
name = "myxen"
vif = [ 'bridge=xenbr0' ]
disk = ['file:/home/xen/myxen/centos.5-2.img,sda1,w',
'file:/home/xen/myxen/swap.img,sda2,w']
dhcp='dhcp'
root = "/dev/sda1 ro"
extra = '4'

Categories: Uncategorized Tags:
  1. No comments yet.
  1. No trackbacks yet.