Xen on Pre- Production Service Marco Verlato INFN-Padova High Availability Group Meeting, 3 October EGEE-II INFSO-RI EGEE and gLite are registered trademarks
High Availability Group Meeting, 3 October Introduction Work from experience at UFRJ (thanks to Pedro Rausch) Just notes written down during the setup Hardware: Oxyria 1U 2xCPU Xeon 2800 2 GB RAM 2x80 GB SATA Hosting PPS-PADOVA site since 1 month: prep-ce-01 (gLite-CE) prep-ce-02 (lcg-CE) prep-se-01 (DPM-SE) cert-mon-01 (rgma-server)
High Availability Group Meeting, 3 October Quick how-to (1) Everything available at: Step by step: 1)install fedora core 5 using fedora5_8GB.cfg e fedora5_8GB.ks in gimo.pd.infn.it 2)“yum update”, “yum install kernel-xen0”, “yum install kernel-xenU” do install xen FC5 + kernels 3)remove kernel-xenU and set default=0 in /etc/grub.conf (set the default to the xen0 kernel) ~]# uname -a Linux cert-08.pd.infn.it _FC5xen0 #1 SMP Tue Aug 8 17:03:19 EDT 2006 i686 i686 i386 GNU/Linux 4)add commands in the kernel lines this way: kernel /boot/xen.gz _FC5 dom0_mem=49152 i.e. set domain-0 memory = 48 MB (if you want four 492 MB VM guests having 2GB available in your hardware), and set (dom0-min-mem 48) in the /etc/xen/xend-config.sxp file
High Availability Group Meeting, 3 October Quick how-to (2) 5)create the partitions (linux + swap) for each Virtual Machine 6)do the needed “mkfs -t ext3 /dev/sdaX” and “mkswap /dev/sda(X+1)” 5) and 6) needed only if not already done within kickstart 7)mount each guest partition and copy there the image of slc304 with the /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth0 files modified in order to get Hostname and IP from DHCP, the /etc/fstab file slightly modified (LABEL=/ replaced with /dev/sda1) and a new /etc/modprob.conf file added containing the lines: alias eth0 xennet alias eth1 e1000 alias scsi_hostadapter ata_piix (I made a tgz with these changes already included, just do tar –zxvf slc304-i386.tgz –C $GUEST_PARTITION)
High Availability Group Meeting, 3 October Quick how-to (3) The following steps from 8) to 11) are collected in the script xenize.sh 8)copy the files from the kernel xenU into the relevant places of each guest partition, e.g.: cp -R /lib/modules/ _FC5xenU/ $GUEST_PARTITION/lib/modules/ cp /boot/vmlinuz _FC5xenU $GUEST_PARTITION/boot/ cp /boot/initrd _FC5xenU.img $GUEST_PARTITION/boot/ cp /boot/System.map _FC5xenU $GUEST_PARTITION/boot/ cp /boot/config _FC5xenU $GUEST_PARTITION/boot/ 9)overwrite the module-init-tools (for kernel 2.6), i made a tgz for you: tar –zxvf module-init-tools pre5.3.2.tgz –C $GUEST_PARTITION 10)copy the fedora5 e2fsck files to each guest partition, e.g.: cp /sbin/e2fsck $GUEST_PARTITION/sbin/ cp /sbin/fsck.ext3 $GUEST_PARTITION/sbin/ 11)change the mode of /dev/null at the guest boot: echo “chmod 666 /dev/null” >> $GUEST_PARTITION/etc/rc.d/rc.local
High Availability Group Meeting, 3 October Quick how-to (4) 12) Finally, you need to create in the master the guest configuration files. They should reside in /etc/xen, and later be placed under /etc/xen/auto, so that they are started on boot. Relevant configuration values for my glite-CE : memory = 492 name = "prep-ce-01" vcpus = 2 vif = [ 'mac=00:00:C1:CE:D2:40, bridge=xenbr0' ] (fake mac address) disk = [ 'phy:/dev/sda3,sda1,w','phy:/dev/sda6,sda2,w' ] dhcp="dhcp“ root = "/dev/sda1 rw" 13) xm create –c /etc/xen/auto/youreguestmachine, and if the VM boot is OK do: /sbin/chkconfig --level 345 xend on /sbin/chkconfig --level 345 xendomains on to automatically start the VMs at the boot.
High Availability Group Meeting, 3 October Average CPU Usage (by F.Nebiolo software) MonthlyWeekly DailyHourly
High Availability Group Meeting, 3 October …and SFT and SAM looks OK