CentOS 5.3 XEN Host – IBM DS3300 iSCSI – SuSE Linux Enterprise 10 XEN Guests – Part 2

Friday, July 10th, 2009

Hardware :

  • IBM x3650 – 7979C3G – 2x XEON x5355 – 18GB RAM
  • IBM x3650 – 7979A2G – 2x XEON E5335 – 12GB RAM
  • IBM DS3300 iSCSI Storage

Software :

  • CentOS 5.3 – XEN Hosts
  • SuSE Linux Enterprise 10 – XEN Guests
  • LSI rdac Multipath Modules

CentOS XEN Guest installation (SuSE Linux Enterprise 10 – SP2)

[roo@xen-host-1 ~]# mkdir -p /root/suse_xen_build
[roo@xen-host-1 ~]# cd /root/suse_xen_build

The Kernel from the Suse Linux Enterprise 10 SP2 media  (kernel-xen-2.6.16.60-0.21.x86_64.rpm) did not work for setup.
Fetch a newer Kernel from the Novel update Server. (kernel-xen-2.6.16.60-0.39.3.x86_64.rpm) works fine.
From the media you need the install-initrd-1.0-19.2.x86_64.rpm file.
Fetch the suse-prepare-install script from Gerd Hoffmann aka Gerd Knorr : http://et.redhat.com/~kraxel/xen/suse-prepare-install

[roo@xen-host-1 suse_xen_build]# ls -l /root/suse_xen_build

-r–r–r– 1 root root  3369491  1. Jun 11:11 install-initrd-1.0-19.2.x86_64.rpm
-rw-r–r– 1 root root 18224165  1. Jun 11:11 kernel-xen-2.6.16.60-0.39.3.x86_64.rpm
-rwxr-xr-x 1 root root     1653  1. Jun 11:11 suse-prepare-install.sh

[roo@xen-host-1 suse_xen_build]# ./suse-prepare-install.sh

[roo@xen-host-1 suse_xen_build]# ls -l

-r–r–r– 1 root root  3369491  1. Jun 11:11 install-initrd-1.0-19.2.x86_64.rpm
-rw-r–r– 1 root root  1409664  1. Jun 11:11 inst.xen-2.6.16.60-0.39.3-x86_64-kernel
-rw-r–r– 1 root root  8798392  1. Jun 11:11 inst.xen-2.6.16.60-0.39.3-x86_64-ramdisk
-rw-r–r– 1 root root 18224165  1. Jun 11:11 kernel-xen-2.6.16.60-0.39.3.x86_64.rpm
-rwxr-xr-x 1 root root     1653  1. Jun 11:11 suse-prepare-install.sh

[roo@xen-host-1 suse_xen_build]# cd /etc/xen

[roo@xen-host-1 xen]# cat suse1.cfg

name = “suse1″
memory = “4096″
vcpus = 4
vif = [ 'mac=00:16:3e:xx:xx:xx, bridge=xenbr0' ]
disk = [ 'phy:/dev/disk/by-id/scsi-3600a0b8000370e3b000018cdxxxxxxxx,hda,w' ]
on_reboot = “destroy”
on_crash = “destroy”
kernel = “/root/suse_xen_build/inst.xen-2.6.16.60-0.39.3-x86_64-kernel
ramdisk = “/root/suse_xen_build/inst.xen-2.6.16.60-0.39.3-x86_64-ramdisk
extra = “xencons=xvc0 console=xvc0″

[roo@xen-host-1 xen]# xm create -c /etc/xen/suse1.cfg

Finish the first stage of the installation process. I have done a installation via network using ftp protocoll.
When the first stage finished and the setup reboot the VM will be destroyed. Take a look at the config file (on_reboot = “destroy”).
Now we must change the kernel and ramdisk option in the config.

name = “suse1″
memory = “4096″
vcpus = 4
vif = [ 'mac=00:16:3e:xx:xx:xx, bridge=xenbr0' ]
disk = [ 'phy:/dev/disk/by-id/scsi-3600a0b8000370e3b000018cdxxxxxxxx,hda,w' ]
on_reboot = “destroy”
on_crash = “destroy”
kernel = “/etc/xen/vm/vmlinuz-2.6.16.60-0.39.3-xen
ramdisk = “/etc/xen/vm/initrd-2.6.16.60-0.21-xen
extra = “xencons=xvc0 console=xvc0″

We need a vmlinuz-2.6.16.60-0.39.3-xen and a initrd-xen file to start the second stage.
The vmlinuz-2.6.16.60-0.39.3-xen file ist inside the rpm we fetched.

[roo@xen-host-1 xen]# mkdir -p /etc/vm
[roo@xen-host-1 xen]# mkdir -p /root/temp
[roo@xen-host-1 xen]# cd /root/temp
[roo@xen-host-1 temp]# cp /root/suse_xen_build/kernel-xen-2.6.16.60-0.39.3.x86_64.rpm .
[roo@xen-host-1 temp]# rpm2cpio kernel-xen-2.6.16.60-0.39.3.x86_64.rpm | cpio -ivmud
[roo@xen-host-1 temp]# ls -l

drwx—— 2 root root     4096 10. Jun 13:13 boot
drwx—— 3 root root     4096 10. Jun 13:13 etc
-rw-r–r– 1 root root 18224165 10. Jun 13:13 kernel-xen-2.6.16.60-0.39.3.x86_64.rpm
drwx—— 3 root root     4096 10. Jun 13:13 lib
drwx—— 3 root root     4096 10. Jun 13:13 usr

[roo@xen-host-1 temp]#cp /root/temp/boot/vmlinuz-2.6.16.60-0.39.3-xen /etc/xen/vm

Mount the /boot Partition from the VM.

[roo@xen-host-1 temp]# mount /dev/disk/by-id/scsi-3600a0b8000370e3b000018cdxxxxxxxx-part1 /mnt

[roo@xen-host-1 temp]#cd /mnt/boot

[roo@xen-host-1 boot]# cp initrd-2.6.16.60-0.21-xen /etc/xen/vm

[roo@xen-host-1 temp]#cd /etc/xen/vm

[roo@xen-host-1 vm]#umount /mnt

[roo@xen-host-1 vm]#xm create -c /etc/xen/suse1.cfg

Now finish the installation. Apply all updates an you will find the same kernel in the /boot from suse1 VM.
Copy the new initrd file via scp to your XEN host at /etc/xen/vm/ and change the suse1.cfg file to match the filename.

Thats all folks !

Comments are closed.