Monthly Archive for March, 2007

Taking Xen guests (domU) alive via routed network

The xend config looks like this:

playground:~# grep -v ^# /etc/xen/xend-config.sxp
(network-script ‘network-bridge netdev=dummy0′)
(vif-script vif-bridge)
(dom0-min-mem 196)
(dom0-cpus 0)

Creating volume group for Xen domU (/dev/hdb2 was allready created with id 8e):

playground:~# pvcreate /dev/hdb2
Physical volume “/dev/hdb2″ successfully created
playground:~# vgcreate xen-vol /dev/hdb2
Volume group “xen-vol” successfully created
playground:~# vgscan
Reading all physical volumes. This may take a while…
Found volume group “xen-vol” using metadata type lvm2

Creating first domU:

playground:~# xen-create-image –ip 192.168.222.50 –hostname xetch.blubb.cyconet.org
General Infomation
——————–
Hostname : xetch.blubb.cyconet.org
Distribution : etch
Fileystem Type : ext3
Size Information
—————-
Image size : 4Gb
Swap size : 1024Mb
Image type : full
Memory size : 128Mb
Kernel path : /boot/vmlinuz-2.6.18-4-xen-vserver-686
Initrd path : /boot/initrd.img-2.6.18-4-xen-vserver-686
Networking Information
———————-
IP Address 1 : 192.168.222.50
Netmask : 255.255.255.0
Gateway : 192.168.222.1
Creating ext3 filesystem on /dev/xen-vol/xetch.blubb.cyconet.org-disk
Done
Installing your system with debootstrap mirror ftp://ftp.de.debian.org/debian/
Done
Running hooks
Done
No role script specified. Skipping
Creating Xen configuration file
Done
Setting up root password
Enter new UNIX password:
etype new UNIX password:
passwd: password updated successfully
All done
Logfile produced at:
/var/log/xen-tools/xetch.blubb.cyconet.org.log

Add the following to /etc/network/interfaces:

auto dummy0
iface dummy0 inet static
address 192.168.222.1
netmask 255.255.255.0
network 192.168.222.0
broadcast 192.168.222.255

Bringing up network interface, restarting xen and starting the domU:

playground:~# ifup dummy0
playground:~# /etc/init.d/xendomains stop
playground:~# /etc/init.d/xend restart
playground:~# /etc/init.d/xendomains start
playground:~# xm create xetch.blubb.cyconet.org.cfg -c
Using config file “/etc/xen/xetch.blubb.cyconet.org.cfg”.

If you want to autostart your domUs, you have to symlink the configfile to /etc/xen/auto:

playground:~# mkdir /etc/xen/auto/
playground:~# ln -s /etc/xen/xetch.blubb.cyconet.org.cfg /etc/xen/auto/xetch.blubb.cyconet.org.cfg

Getting started with XEN on etch

Today I thought it’s time to look deeper into the Xen hype. So I decided to install xen on etch. I followed Ganneffs recommandation

playground:~# aptitude install bridge-utils iproute \
xen-ioemu-3.0.3-1 xen-utils-3.0.3-1\
xen-linux-system-2.6.18-4-xen-vserver-686 libc6-xen

Booting the dom0 leeds me into kernel panic, cause no root device was found. Hmm … there seems to be the driver missing. Right - there wasn’t any /boot/initrd.img-2.6.18-4-xen-vserver-686.
Waldi did hint me to /var/lib/dpkg/info/linux-image-2.6.18-4-xen-vserver-686.postinst and I got my ramdisk this way:

playground:~# update-initramfs -c -t -k \
2.6.18-4-xen-vserver-686
playground:~# command -v update-grub > \
/dev/null && update-grub

After booting dom0 successfully, my serial console disappeared. After some digging around, I got the clue I need to tell xen, that there is one.
I modified /boot/grub/menu.lst:

# xenhopt=com1=115200,8n1 console=com1
..
# xenkopt=console=vga

Dom0 is running now, lets see what we can do next, maybe:

playground:~# aptitude install xen-tools

MySQL5 support in php5 packages on backport.org

I’m stuck of the requests linking php5 on backports.org against “MySQL5″.
You need support of MySQL5 or the mysqli extention for your php5 packages for sarge? So the packages on backports.org are not what you want.

The packages are compiled against libmysqlclient12 (mysql 4.0) cause all apache modules (on backports.org) are compiled against this version. Linking php5 against an other version will lead you in trouble when using these apache modules and php5 together, cause sarge doesn’t support “versioned symbols”.

For more information see the threads on php-maint or
backports-users
! If you install packages from backports.org, you should read the latter one anyways.

vroot support gone in debian kernel 2.6.18 … why?

# grep -i vroot /boot/config*-vserver*
/boot/config-2.6.16-2-vserver-686:CONFIG_BLK_DEV_VROOT=y
/boot/config-2.6.17-2-vserver-686:CONFIG_BLK_DEV_VROOT=y
/boot/config-2.6.18-3-vserver-686:# CONFIG_BLK_DEV_VROOT is not set
/boot/config-2.6.18-4-vserver-686:# CONFIG_BLK_DEV_VROOT is not set

Does anybody know, why it’s not compiled in since 2.6.18 anymore?