Nethence Documentation Lab Webmail Your IP BBDock  


Those documents are obsolete, please use the Nethence Documentation instead.

HomeUnixWindowsOracleObsoleteHardwareDIYMechanicsScriptsConfigsPrivate

RHEL5 XEN dom0
with XEN3 hypervisor
 
 
Installation
During installation, check the Virtualization and Gnome sets. Note. Gnome provides the gtk theme for virt-manager. But you can still install the group manually,
#yum grouplist
yum -y groupinstall Virtualization

#yum search kernel | grep ^kernel
yum -y install \
kernel \
kernel-headers \
kernel-devel \
kernel-xen-devel
yum -y update \
kernel \
kernel-headers \
kernel-devel \
kernel-xen-devel
 
Check you've got the same version for, kernel, devel and headers,
rpm -qa | grep kernel
e.g.,
kernel-xen-2.6.18-194.32.1.el5
kernel-xen-devel-2.6.18-194.32.1.el5
kernel-headers-2.6.18-194.32.1.el5
and check the corresponding kernel modules are there,
ls -l /lib/modules/
note. e.g. 2.6.18-194.32.1.el5xen
 
Make sure GRUB boots the XEN kernel by default,
cd /boot/grub/
cp grub.conf grub.conf.dist
vi grub.conf
e.g.,
default=1
timeout=1

title CentOS (2.6.18-194.32.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-194.32.1.el5 root=/dev/hda3 md=
initrd /initrd-2.6.18-194.32.1.el5.img
title CentOS (2.6.18-194.32.1.el5xen)
root (hd0,0)
kernel /xen.gz-2.6.18-194.32.1.el5 dom0_mem=128M
module /vmlinuz-2.6.18-194.32.1.el5xen root=/dev/hda3 md=
module /initrd-2.6.18-194.32.1.el5xen.img
Note. adding dom0_mem=128M to the kernel /xen line
Note. no need for dom0-min-mem, which will be defined into xend-config.sxp
 
 
Configuration
Clean up the config file,
cd /etc/xen/
mv xend-config.sxp xend-config.sxp.dist
sed '/^#/d; /^$/d' xend-config.sxp.dist > xend-config.sxp
vi xend-config.sxp
change dom0-min-mem and dom0-cups,
(dom0-min-mem 64)
(dom0-cpus 1)
 
For domU but also for dom0, disable intel microcode,
chkconfig --list | grep microcode_ctl
chkconfig microcode_ctl off
 
Make sure 'xend' and 'xendomains' are enabled,
chkconfig --list | grep xen
 
Eventually disable iptables and selinux,
yum install system-config-securitylevel-tui
system-config-securitylevel-tui
chkconfig ip6tables off
chkconfig iptables off
and make sure there's no desktop-style network manager at work,
chkconfig --list | grep -i networkmanager
 
 
Ready to go
You can now reboot the host as a xen capable dom0,
sync
shutdown -r now
 
 
System configuration
Once booted try to ping the dom0 from the network. Note. if you're using XEN inside VMware ESX, make sure you configured the virtual switch and lan with promiscuous mode enabled.
 
Check peth0 and vif0.0 are in bridge 'br0', and check port 1 of the ARP table which should correspond to peth0 (empty MAC with arp disabled) and eth0 (MAC copied to it by the bridge script),
brctl show
brctl showmacs br0 | grep '^ 1'
 
Check status of IP forwarding,
cat /proc/sys/net/ipv4/ip_forward
either disable it or let the iptable rules showed above.
Note. you can't just save those rules to sysconfig/iptables which are retro compatible with a non bridge configuration. Just like sysconfig/network-scripts/ifcfg-eth*.
 
Make sure you're running a XEN kernel, the XEN daemon, udev and HAL daemons are running,
uname -r
service xend status
ps aux | grep udevd
#ps aux | grep hald
note. the latter should return two lines, hald and hald-runner
also check for hotplug script rules, which for "tap", "vbd" and "vif" devices,
ll /etc/udev/rules.d/xen-backend.rules
 
Make sure you have a large mount point or shared disk filesystem (GFS, OCFS) to store the virtual disks,
df -h
Note. we're using "/data".
 
Higher the possible loop devices (defaults to 8 on Redhat systems),
vi /etc/modprobe.conf
like,
options loop max_loop=50
apply,
rmmod loop
modprobe loop
 
Set the time on dom0,
ntpdate ntp.obspm.fr
or,
date -s YYYYMMDD
date -s HH:MM
Note. domU's date is synced w/ dom0's one, even instantly if changed, at least on paravirtualized guests.
 
Check the XEN daemon logs,
tail -F /var/log/xen/xend.log
and for screen,
cat >> ~/.screenrc <<EOF9
screen -t "xen" 1 tail -F /var/log/xen/xend.log
EOF9


Last update: Jun 28, 2011