User Tools

Site Tools


archive_xen

This is an old revision of the document!


Overview

  • We have two P4 PCs, vislor and adric, running Xen 3.0.1.
  • They run Fedora core 5 dom0s with Fedora's Xen-patched kernels (version 2.6.15).
  • As neither machine has space for more than one hard disk, the systems use DRBD to provide data redundancy.
  • vislor (P4 1.7GHz/768MB/40GB) is intended to run domUs for production services as it is the most powerful of the two.
  • adric (P4 1.6GHz/512MB/60GB) runs testing or sandbox domUs, may be used to test new versions of Xen, and provides a mirror of the production domUs' root filesystems.

OS Setup

The unpopular decision to run Fedora core on vislor and adric was made based on its excellent Xen packaging and the poor state of the Debian Xen-patched kernels. –Pert 12:40, 20 October 2006 (BST)

In order to document the installation and to provide an easy way for the boxes to be re-installed by others I used kickstart scripts; available here (only accessable from tardis):

Disk Setup

Vislor:

  • hda1: 4GB ext3 /
  • hda2: 30GB DRBD-PV (drbd0)
  • hda3: ~3GB LVM-PV (swaps VG)
  • hda4: 512MB swap
  • drbd0: 30GB LVM-PV (prod-roots VG)

Adric:

  • hda1: 4GB ext3 /
  • hda2: 30GB DRBD-PV (drbd0)
  • hda3: 512MB swap
  • hda5: 20GB LVM-PV (test-roots VG)
  • hda6: ~3GB LVM-PV (swaps VG)

How to build DRBD for Fedora

yum install make gcc flex bison rpm-build kernel-xen0-devel
wget http://oss.linbit.com/drbd/0.7/drbd-0.7.21.tar.gz
tar -xzvf drbd-0.7.21.tar.gz
cd drbd-0.7.21/
patch <<'END'
--- drbd.spec.in.orig   2006-10-19 11:05:09.000000000 +0100
+++ drbd.spec.in        2006-10-19 11:05:45.000000000 +0100
@@ -64,9 +64,9 @@
 %prep
 %setup
 test -d %{kdir}/.
-test $(echo -e "#include <linux/version.h>\ndrbd_kernel_release UTS_RELEASE" |
-       gcc -nostdinc -E -P -I%{kdir}/include - |
-       sed -ne 's/^drbd_kernel_release "\(.*\)".*/\1/p') = %{kernelversion}
+#test $(echo -e "#include <linux/version.h>\ndrbd_kernel_release UTS_RELEASE" |
+#       gcc -nostdinc -E -P -I%{kdir}/include - |
+#       sed -ne 's/^drbd_kernel_release "\(.*\)".*/\1/p') = %{kernelversion}

 %build
 echo kernelversion=%{kernelversion}
END
make rpm

How to Add New Instances

Login to leela, and add the new box to /etc/bind/db.tardis and /etc/bind/db.193.62.81. Use co -l to check out the files and ci -u -wusername to log it back in. Remember to update the serial number. See the [http://wiki.tardis.ed.ac.uk/index.php/DNS_Service|DNS] page.

Login to vislor, which is the main xen machine. Use the mkdomU.bash script to create the new instance like so:

mkdomU.bash -vh[newmachinename]

Say yes to shadow passwords, type in root password (twice), say no to creating a user account.

If you want to do something complicated, have a look at /etc/mkdomU.conf, or at the script at /usr/local/bin/mkdomU.bash .

Unmount /mnt/mkdomU once it's done.

Run

xm create -c [newmachinename] 

to get the instance up and running. You should be able to log in.

archive_xen.1165165561.txt.gz · Last modified: (external edit)