Setup Debian Lenny PV & HVM DomUs (64-bit) sharing same image device at Xen 3.4.1 & Libvirt 0.7.1-10 Dom0 on top of F12 (rawhide) with pvops enabled kernel

October 14, 2009

Posting bellow provides a workaround for failure of straight forward virt-install Debian Lenny 64-bit DomU via location . It doesn’t require debootstrap involvement and would work on OpenSolaris 2010-02-124 and Solaris Nevada 124 as well. Download mini installer iso image and virt-install Lenny HVM DomU:-

# wget

# virt-install --debug -n Debian5HVM --hvm -r 1024 --vcpus=1 -f /dev/sda9 --vnc -c /home/boris/mini.iso

Login as root into HVM Debian DomU

# apt-get install linux-image-xen-amd64

Add entries to /boot/grub/menu.lst :-

title Debian GNU/Linux, kernel 2.6.26-2-amd64 (vfb)
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-2-xen-amd64 root=/dev/xvda1 ro console=tty0
initrd /boot/initrd.img-2.6.26-2-xen-amd64

title Debian GNU/Linux, kernel 2.6.26-2-xen-amd64 (hvc0)
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-2-xen-amd64 root=/dev/xvda1 ro console=hvc0
initrd /boot/initrd.img-2.6.26-2-xen-amd64

Modify /etc/inittab to support serial console ( just in case)

Shutdown HVM DomU
Create profile

name = "Debian5PV"
memory = 2048
vcpus = 1
vif = [ 'bridge=eth1' ]
disk = [ 'phy:/dev/sda9,xvda,w']
vfb= ['type=vnc,vncunused=1']

# xm create
# vncviewer localhost:0

Run in different terminal session

# virsh dumpxml Debian5PV > Debian5PV.xml

Shutdown PV DomU

# virsh define Debian5PV.xml

Installation on OSOL-2010-02-124

virt-install --hvm --name Debian5HVM --ram 1024 --vnc \
--os-type=linux --network bridge \
--disk path=/tank03/disk-linux,size=15,driver=phy,subdriver=zvol \
--cdrom /export/home/boris/mini.iso

Debian Lenny PV DomU profile

root@opensolaris:/export/home/boris/lenny# cat lenny.cfg
name = "Debian5PV"
memory = 2048
vcpus = 1
vif = [ ' ' ]
disk = [ 'phy:/dev/zvol/dsk/tank03/disk-linux,xvda,w']
vfb= ['type=vnc,vncunused=1']

# xm create lenny.cfg
# vncviewer localhost:0

DRM for Radeon HD 4650,4750 & PVOPS Kernel

October 4, 2009

The most recent DRM Radeon support features of Jeremy Fitzhardinge kernel have been enabled and tested at Xen 3.5 Dom0 on top of Ubuntu Karmic Koala (Beta) Server. Xen host been built reboots directly into Gnome Desktop environment on the box with Core2Quad 9550 CPU, 8 GB RAM, Radeon HD 4X50 Video Card. Tuning kernel described in details bellow with snapshots of every configuration step been taken. Deployment Xen Unstable to Ubuntu Karmic Server environment was done in same way as in [1] and is also briefly documented. Xen 3.5 Dom0 with pvops kernel has been verified via F12 (rawhide) PV DomU install.

First – install on Uubuntu 9.10 Server all packages required for Xen build:-

apt-get install libcurl4-openssl-dev \
xserver-xorg-dev \
python2.6-dev \
mercurial gitk \
build-essential \
libncurses5-dev \
uuid-dev gawk \
gettext texinfo bcc

Second step :-

# cd /usr/src
# hg clone
# cd xen-unstable.hg
Set in
PYTHON = python
# make xen
# make tools
# make install-xen
# make install-tools

Tuning results Xen packages to be placed into /usr/local/lib/python2.6/dist-packages due to Changeset 19594 in xen-unstable.hg. Otherwise, Xen packages would go to /usr/lib/python2.6/site-packages, which is not default location for python 2.6 on Ubuntu 9.10 ( vs F11,F12 ). Thus you won’t be able to start xend in Dom0.
Kernel tuning to turn on Xen Dom0 Support and DRM support for Radeon Video Card.

# git clone git:// linux-2.6-xen
# cd linux-2.6-xen
# make menuconfig

# make -j(x)(number_of_kernels)
# make modules_install install
# mkinitramfs -o /boot/initrd-

Update file /etc/default/grub as follows

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
# Uncomment to disable graphical terminal (grub-pc only)
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
# Uncomment to disable generation of recovery mode menu entrys

Update /etc/grub.d/40_cutom as follows

exec tail -n +3 $0
# This file is an example on how to add custom entries
menuentry "Xen 3.5 / Ubuntu 9.10 kernel pvops" {
insmod ext2
set root=(hd1,1)
multiboot (hd1,1)/xen-3.5.gz
module (hd1,1)/vmlinuz-
module (hd1,1)/initrd-

Then run

# update-grub

To generate grub.cfg entry for loading Xen Host and reboot via new grub2 entry

Dmesg report fragment

[ 27.923278] mtrr: type mismatch for d0000000,10000000 old: write-back new: write-combining
[ 27.923350] mtrr: type mismatch for d0000000,10000000 old: write-back new: write-combining
[ 28.213592] mtrr: type mismatch for d0000000,10000000 old: write-back new: write-combining
[ 28.213659] mtrr: type mismatch for d0000000,10000000 old: write-back new: write-combining
[ 28.213719] mtrr: type mismatch for d0000000,10000000 old: write-back new: write-combining
[ 28.358978] [drm] Setting GART location based on new memory map
[ 28.374561] [drm] Loading RV730/RV740 PFP Microcode
[ 28.374585] [drm] Loading RV730/RV740 CP Microcode
[ 28.389638] [drm] Resetting GPU
[ 28.389695] [drm] writeback test succeeded in 1 usecs

Setup F12 PV DomU

# wget
# wget

Create installation profile

disk = ['phy:/dev/sdc7,xvda,w' ]
vif = [ 'bridge=eth1' ]
vfb = [ 'type=vnc,vncunused=1']
kernel = "/home/boris/fedora/vmlinuz"
ramdisk = "/home/boris/fedora/initrd.img"
on_reboot = 'restart'
on_crash = 'restart'

# xm create f12.install
# vncviewer localhost:0

Runtime profile

disk = ['phy:/dev/sdc7,xvda,w' ]
vif = [ 'bridge=eth1' ]
root="/dev/mapper/vg_fedora-lv_root ro"
vfb = [ 'type=vnc,vncunused=1']
on_reboot = 'restart'
on_crash = 'restart'

1.Setup Xen 3.4.1 Dom0 on top of Ubuntu 9.04 Server via Marc – A. Dahlhaus’s UDEV patch