Xen Print

INSTALLATION

root@serv1:~# apt-get install linux-image-2.6.26-2-xen-686 xen-hypervisor-3.2-1-i386 xen-tools xen-linux-system-2.6.26-2-xen-686 \
linux-headers-2.6.26-2-xen-686 libc6-xen bridge-utils

add the following line to /etc/modules

loop max_loop=64

 

CONFIGURATION

Edit /etc/xen/xend-config.xsp

#fundamental 
(network-script network-bridge)

(vif-script vif-bridge)

#not sure if fundamental
(dom0-min-mem 196)
(dom0-cpus 0)
(vncpasswd '')

File /etc/xen/xen-tools.conf is not really important for now

Still to verify:

Edit /etc/inittab

1:2345:respawn:/sbin/getty 38400 hvc0
2:23:respawn:/sbin/getty 38400 tty1

 

CREATION OF VIRTUAL MACHINES (ex.: Debian Lenny)

Method 1:

root@serv1:~# apt-get install debootstrap 
root@serv1:~# mkdir /mnt/xen
root@serv1:~# mount /dev/serv1/debianroot /mnt/xen
root@serv1:~# debootstrap --arch i386 lenny /mnt/xen http://ftp.debian.org/debian
root@serv1:~# cp -a /lib/modules/`uname -r` /mnt/xen/lib/modules/

Still to verify:

Edit /etc/inittab

1:2345:respawn:/sbin/getty 38400 hvc0
2:23:respawn:/sbin/getty 38400 tty1

FILES OF VIRTUAL MACHINES TO BE MODIFIED (as for this method)

(they are in /mnt/xen/etc/)

Edit /mnt/etc/fstab/

/dev/sda1 / ext3 defaults 0 1
/dev/sda2 swap swap defaults 0 0
/dev/sda3 /home ext3 defaults 0 0
proc /proc proc defaults 0 0

Edit /mnt/etc/hostname

debianvdd

Edit /mnt/etc/hosts

127.0.0.1 localhost debianvdd

Edit /mnt/etc/network/interface

auto lo iface
lo inet loopback
auto eth0
iface eth0 inet dhcp

Edit /mnt/etc/apt/sources.list

deb http://ftp.bononia.it/debian/ lenny main non-free contrib
deb-src http://ftp.bononia.it/debian/ lenny main non-free contrib

deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free

deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free

deb-http://www.debian-multimedia.org/ lenny main

FILE .CFG FOR LAUNCHING VIRTUALE MACHINE

Edit /etc/xen/debianvdd.cfg

kernel      = '/boot/vmlinuz-2.6.26-2-xen-686'
ramdisk = '/boot/initrd.img-2.6.26-2-xen-686'
memory = '1024'
root = '/dev/sda1 ro'
disk = [
'phy:/dev/serv1/debianvdd-root,sda1,w',
'phy:/dev/serv1/debianvdd-swap,sda2,w',
'phy:/dev/serv1/debianvdd-home,sda3,w',
]
name = 'debianvdd'
dhcp = 'dhcp'
vif = [ 'mac=00:00:00:00:00:01' ]
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
extra='xencons=tty1'
root@serv1:~# xm create /etc/xen/debianvdd.cfg -c
root@debianvdd:~# passwd

root@debianvdd:~# apt-get install rcconf udev less openbsd-inetd locales openssh-server
root@debianvdd:~# apt-get install gnome-desktop-enviroment
root@debianvdd:~# apt-get install kde
root@debianvdd:~# dpkg-reconfigure locales