Xen on CentOS-4

From ConShell
Jump to navigation Jump to search

CentOS-4 + Xen 3.0.2-2 install notes

  • Host: lu12
  • Date: 2006-06-13
  • Author: mf1


These packages found to be pre-installed:

sysfsutils ===> sysfsutils-1.2.0-1
bridge-utils => bridge-utils-1.0.4-4
iproute ======> iproute-2.6.9-3
zlib-devel ===> zlib-devel-
zlib =========> zlib-
ncurses ======> ncurses-5.4-13
kernel-devel => kernel-devel-2.6.9-34.0.1.EL
transfig =====> transfig-3.2.4-8

Packages not found via yum:

 wget http://dag.wieers.com/packages/python-twisted/python-twisted-1.3.0-1.2.el4.rf.i386.rpm
 rpm -ivh python-twisted*rpm
 wget http://dag.wieers.com/packages/texmaker/texmaker-1.12-1.2.el4.rf.i386.rpm
 rpm -ivh texmaker*rpm

(Note: had to yum install qt as a dependency)

Packages found thru yum:

yum install SDL curl-devel python-devel ncurses-devel
SDL ===========> SDL-1.2.7-8
curl-devel ====> curl-devel-7.12.1-8.rhel4
python-devel ==> python-devel-2.3.4-14.2
ncurses-devel => ncurses-devel-5.4-13
cd /usr/src
wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-3.0.2-2-src.tgz
tar xzvf xen-3.0.2-2-src.tgz
cd xen-3.0.2-2
make world

Oops... make not found (Dev tools)

yum install make gcc

While we're at it...

yum update

Compile and install the xen kernel

Compile and install the xen userland tools

make world
make install

(this installs the kernel and modules)

[root@lu12 xen-3.0.2-2]# ./install.sh
Installing Xen from './dist/install' to '/'...
 - installing for hotplug-based system
 - modifying permissions
All done.
Checking to see whether prerequisite tools are installed...
Xen CHECK-INSTALL  Tue Jun 13 14:51:56 PDT 2006
Checking check_brctl: OK
Checking check_hotplug: OK
Checking check_iproute: OK
Checking check_python: OK
Checking check_zlib_lib: OK
All done.

Note - I had to circle back and do a yum install bridge-utils because the last command was complaining that brctl could not be found.

Checking check_brctl: 
 *** Check for the bridge control utils (brctl) FAILED
[root@lu12 xen-3.0.2-2]# mkinitrd -v -f /boot/initrd-xen-3.0.2-2.img 2.6.16-xen
Creating initramfs
Looking for deps of module scsi_mod     
Looking for deps of module sd_mod        scsi_mod
Looking for deps of module scsi_mod     
Looking for deps of module unknown      
Looking for deps of module aacraid       scsi_mod
Looking for deps of module scsi_mod     
Looking for deps of module ide-disk     
Looking for deps of module ext3  jbd
Looking for deps of module jbd  
Using modules:  ./kernel/drivers/scsi/scsi_mod.ko ./kernel/drivers/scsi/sd_mod.ko ./kernel/drivers/scsi/aacraid/aacraid.ko ./kernel/fs/jbd/jbd.ko ./kernel/fs/ext3/ext3.ko
/sbin/nash -> /tmp/initrd.i20465/bin/nash
/sbin/insmod.static -> /tmp/initrd.i20465/bin/insmod
/sbin/udev.static -> /tmp/initrd.i20465/sbin/udev
/etc/udev/udev.conf -> /tmp/initrd.i20465/etc/udev/udev.conf
copy from /lib/modules/2.6.16-xen/./kernel/drivers/scsi/scsi_mod.ko(elf32-i386) 
to /tmp/initrd.i20465/lib/scsi_mod.ko(elf32-i386)
copy from /lib/modules/2.6.16-xen/./kernel/drivers/scsi/sd_mod.ko(elf32-i386) to
copy from /lib/modules/2.6.16-xen/./kernel/drivers/scsi/aacraid/aacraid.ko(elf32
-i386) to /tmp/initrd.i20465/lib/aacraid.ko(elf32-i386)
copy from /lib/modules/2.6.16-xen/./kernel/fs/jbd/jbd.ko(elf32-i386) to /tmp/ini
copy from /lib/modules/2.6.16-xen/./kernel/fs/ext3/ext3.ko(elf32-i386) to /tmp/i
Loading module scsi_mod
Loading module sd_mod
Loading module aacraid
Loading module jbd
Loading module ext3
[root@lu12 xen-3.0.2-2]# mkdir -p /var/lib/xenstored
[root@lu12 xen-3.0.2-2]# mkdir -p /var/run/xenstored

Added this entry to /etc/grub.conf

title Xen 3.0.2-2 / XenLinux 2.6.16
      root (hd0,0)
      kernel /xen-3.0.gz dom0_mem=131072
      module /vmlinuz-2.6.16-xen ro root=/dev/sda3
      module /initrd-xen-3.0.2-2.img
(Note: Remember to correctly specify the root device (root=/dev/sda3 in this case) to your current root device. Check your root device with command: mount )

Reboot with the new kernel

(Note, don't try with dom0_mem less than 131072!)

/sbin/chkconfig --add xend
/etc/init.d/xend start
[root@lu12 ~]# xm list
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0      128     2 r-----    43.2
[root@lu12 ~]# xm info
host                   : lu12.example.org
release                : 2.6.16-xen
version                : #1 SMP Tue Jun 13 14:30:07 PDT 2006
machine                : i686
nr_cpus                : 2
nr_nodes               : 1
sockets_per_node       : 2
cores_per_socket       : 1
threads_per_core       : 1
cpu_mhz                : 1258
hw_caps                : 0383fbff:00000000:00000000:00000040
total_memory           : 3840
free_memory            : 3674
xen_major              : 3
xen_minor              : 0
xen_extra              : .2-2
xen_caps               : xen-3.0-x86_32
platform_params        : virt_start=0xfc000000
xen_changeset          : Thu Apr 13 15:18:37 2006 +0100 9617:5802713c159b
cc_compiler            : gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)
cc_compile_by          : root
cc_compile_domain      : example.org
cc_compile_date        : Tue Jun 13 13:29:57 PDT 2006

It appears that xen does not have PAE setup. Maybe not a big deal, but something we'd want to have smoothed out for production. Oh well.