Light weight X-windows System for Xen 3.5-Unstable Dom0 on top of Ubuntu 9.04 Server
Management remote Xen Unstable Dom0 on top of Ubuntu Jaunty Server via VNC connection,invoking /usr/bin/gnome-session might have a problem with low quality network switches, unable properly communicate with PCI-E Ethernet Gigabit Adapters integrated on the boards.Light weight X environment might be required to manage HVM DomUs via VNC. Following bellow is an exact set of instructions for Xen 3.5(4) hackery on Ubuntu 9.04 Server. AppArmor and Network-Manager may be kept as installed originally . View [1] for the first draft.
Have Ubuntu Intrepid Server dual boot with Jaunty just to perform Xen build properly and remove afterwards . It's needed due to issues with python setup on Jaunty Server. We would build Xen Unstable (3.5) from source on Ubuntu 8.10 server and perform install via "make dist and install.sh to remote instance". I believe procedure bellow will run same way with Jaunty root file system mounted as NFS share on Intrepid Server.
Follow [2] and install Light weight X windows system. Instructions bellow are a bit different from [2]. That was
the way it worked for me. I've installed synaptic right away to get eset&esetroot installed. Synaptic is also very helpful when install packages for Xen build. Install GUI and VNC:-
Downsize the system:
vi /etc/default/linux-restricted-modules-common:
DISABLED_MODULES="ath_hal fc fglrx ltm nv"
Install the X11 bare bone:
# aptitude install x-window-system-core
# aptitude install fluxbox fluxconf #lightwight windows manager
# aptitude install dillo #lightweight browser
# aptitude install xfe #lightweight file manager
# apttitude install synaptic # To install eset & esetroot
Change /etc/X11/xorg.conf:
# dpkg-reconfigure xserver-xorg #guided setup
Edit /etc/X11/xorg.conf (use "gtf 1024 768 60" to obtain the Modeline values)
When done start X-server to make sure fluxbox is completely functional :-
startx
Notice , that x11vnc would work , but not under Xen Hypervisor. So, installed via Synaptic all SDL libraries and vnc4server. Updated ~.vnc/xstartup to start fluxbox in background. Updated /etc/rc.local :-
vncserver :1 -geometry 1280x1024 -depth 16
Perform core build on Ubuntu Intrepid Server.
# cd /usr/src
# hg clone http://xenbits.xensource.com/xen-unstable.hg
# cd xen-unstable.hg
# make world
# make dist
Second - install on Uubuntu 9.04 Server all packages required for Xen build:-
libcurl-dev
xserver-dev
python2.6-dev
python2.5
python2.5-dev
mercurial
gitk
build-essential
libncurses5-dev
uuid-dev
gawk
gettext
texinfo
bcc
and perform fake Xen Unstable build on Ubuntu Jaunty Server :-
# cd /usr/src
# hg clone http://xenbits.xensource.com/xen-unstable.hg
# cd xen-unstable.hg
Set in Config.mk
PYTHON = python
PYTHON_PREFIX_ARG =
# make install-xen
# make install-tools
Remove installed Hypervisor and tools
# make uninstall
This actions will result Xen packages to be installed in :-
/usr/local/lib/python2.6/dist-packages/xen# ls -l
total 36
-rw-r--r-- 1 root staff 2 2009-05-20 17:03 __init__.py
-rw-r--r-- 1 root staff 140 2009-05-20 17:20 __init__.pyc
drwxr-sr-x 2 root staff 4096 2009-05-20 17:20 lowlevel
drwxr-sr-x 2 root staff 4096 2009-05-20 17:20 sv
drwxr-sr-x 3 root staff 4096 2009-05-20 17:20 util
drwxr-sr-x 2 root staff 4096 2009-05-20 17:20 web
drwxr-sr-x 5 root staff 4096 2009-05-20 17:20 xend
drwxr-sr-x 3 root staff 4096 2009-05-20 17:20 xm
drwxr-sr-x 2 root staff 4096 2009-05-20 17:20 xsview
with the only one purpose to support pygrub been using python2.6. Install also python 2.5 and
python2.5-dev on Ubuntu Jaunty Server. Symbolic link /usr/lib/python is pointing to python2.6.
root@ServerJaunty:~# ls -l /usr/bin/python
lrwxrwxrwx 1 root root 9 2009-05-19 08:55 /usr/bin/python -> python2.6
Load Intrepid Server Instance and
# mount /dev/sda1 /mnt
I presume that root FS of Jaunty Server is installed on /dev/sda1.
Now proceed with install Xen Unstable (3.5-unstable) core system:-
# mount /dev/sda1 /mnt
# cd /usr/src/xen-unstable.hg/dist
root@ServerIntrepid:/usr/src/xen-unstable.hg/dist# ./install.sh /mnt
Installing Xen from './install' to '/mnt'...
- installing for udev-based system
- modifying permissions
All done.
Checking to see whether prerequisite tools are installed...
Xen CHECK-INSTALL Wed May 20 14:33:35 EDT 2009
Checking check_brctl: OK
Checking check_crypto_lib: OK
Checking check_curl: unused, OK
Checking check_iproute: OK
Checking check_python: OK
Checking check_python_xml: OK
Checking check_udev: OK
Checking check_xml2: unused, OK
Checking check_zlib_lib: OK
All done.
At this point you would have to install either xenified 2.6.29.4 or pvops enabled kernel on Ubuntu 9.04 (aka Jaunty )Server. I've tested 2.6.29.4 ,patched via rebased Suse's rpm by Andy Lyon, and the most recent 2.6.30-rc6-tip kernels.
How to install pvops enabled kernel from Jeremy Fitzhradinge
git repository:-
Checkout the most recent branch:-
# git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-xen
# cd linux-2.6-xen
# git checkout origin/xen-tip/next -b xen-tip/next
Setup Xen Dom0 Support
# make menuconfig
Now build
# make
# make modules_install install
# mkinitramfs -o /boot/initrd-2.6.30-rc6-tip.img 2.6.30-rc6-tip
Add entry to /boot/grub/menu.lst:-
title Xen 3.5 / Ubuntu 9.04 kernel 2.6.30-rc6-tip
uuid 34d2c0bd-fe30-47e0-990e-4921caf1e845
kernel /boot/xen-3.5.gz
module /boot/vmlinuz-2.6.30-rc6-tip root=/dev/sda14 ro console=tty0
module /boot/initrd-2.6.30-rc6-tip.img