Hi there this is my english tranlation of the my Howto in the German Forum:
http://forums.contribs.org/index.php?topic=38759.0As I am a Linux beginner there are maybe some places where things would be done more efficient. So feel free and give me Feedback and I willupdate it.
First you need an working Xen 3.1. For german users the easiest way to get this was the DVD-Release from the german computer magazine CT. Maybe in some weeks there will be under this Url an Iso Download:
http://www.heise.de/ct/projekte/machmit/ctserver/roadmapAll this instructions are based on Debian and require for the HVM Part an Processor with Vanderpool oder Pacifica Technology
ServerIP: 192.168.0.252
ServerName: xebian
volumegroup: xebian
Dom0-Debian:
apt-get update
apt-get install xen-ioemu xen-tools pciutils
touch /etc/xen/smeserver
touch /etc/xen/sme
Create Directory where to put every IsoImage
mkdir /mnt/isos
copy the SME 7.2 Iso into this directory and name it: smeserver-7.2-i386.iso
Now edit the Xen config
pico /etc/xen/xend-config.sxp
and change the following line from: #(vnc-listen '127.0.0.1')
to (vnc-listen '192.168.0.251')
now restart xen : /etc/init.d/xend restart
Next make an LVM for HVM install, more then 10G is not necassery because late we will copy the files: lvcreate -L 10G -n smeserver xebian
Now make the HVM configuration: pico /etc/xen/smeserver
and paste the following inside this:
pico /etc/xen/smeserver und folgendes reinkopieren
path='/usr/lib/xen-3.1.0-1'
kernel = path+'/boot/hvmloader'
builder='hvm'
memory = '512'
name = 'smeserver'
device_model = path+'/bin/qemu-dm'
# boot on floppy (a), hard disk (c) or CD-ROM (d)
boot='d'
disk = [ 'phy:/dev/xebian/smeserver,hda,w',
'file:/mnt/isos/smeserver-7.2-i386.iso,hdc:cdrom,r' ]
vnc=1
vncviewer=0
vncpasswd='smeserver'
vif=['bridge=intern']
on_poweroff = 'destroy'
on_reboot = 'destroy'
on_crash = 'destroy'
Now you can start this machine with: xm create smeserver
To verify that it is running: xm list smeserver --long |grep host
Now connect with vnc to the Ip Adress 192.168.0.251 an use as password smeserver
HVM-DomU:
install smeserver with the options: noraid nolvm <<<you will see the reason for this at *****
after finishing installation change from boot='d' to boot='c':
pico /etc/xen/smeserver
Now reboot with xm create smeserver and connect with VNC: when asked to choose as passwort try a simple one because I had some problems with special chars. Do a yum update and reboot, now install Xen Kernel
yum install kernel-xenU
and shutdown
Dom0:
Build new LVM for your Server and format them feel free to choose the sizes according to your needs.
lvcreate -n sme_lv_boot -L 200M xebian
lvcreate -n sme_lv_root -L 60GB xebian
lvcreate -n sme_lv_swap -L 2GB xebian
mkfs -t ext3 /dev/xebian/sme_lv_boot
mkfs -t ext3 /dev/xebian/sme_lv_root
mkswap /dev/xebian/sme_lv_swap
mkdir /temp
Copy the Boot partition from HVM-Machine to your new created LVM.
/usr/lib/xen-3.1.0-1/bin/lomount -diskimage /dev/xebian/smeserver -partition 1 /mnt/temp/
mount /dev/xebian/sme_lv_boot /opt
Copy with mc evertything from /mnt/temp/ to /opt
Copy Sme-Xen Kernel in Dom0
Datein rüberkopieren
mkdir -p /var/lib/xen/smeserver
cd /var/lib/xen/smeserver
cp /mnt/temp/initrd-2.6.9-55.0.9.ELxenU.img /mnt/temp/vmlinuz-2.6.9-55.0.9.ELxenU /var/lib/xen/smeserver/
umount /mnt/temp
Copy the root partition from HVM-Machine to your new created LVM:
***** when I installed the SME only with noraid I got an error here, maybe someone could provide further instructions.
/usr/lib/xen-3.1.0-1/bin/lomount -diskimage /dev/xebian/smeserver -partition 2 /mnt/temp/
Copy with mc evertything from /mnt/temp/ to /opt
umount /mnt/temp
Now create an paravirtualized Machine
pico /etc/xen/sme
#sme server domu xen
path='/var/lib/xen/smeserver/'
kernel=path+'vmlinuz-2.6.9-55.0.9.ELxenU'
ramdisk=path+'initrd-2.6.9-55.0.9.ELxenU.img'
#ramdisk=path+'initrd.img'
memory = '264'
name = 'sme'
vif = ['bridge=intern']
#disk=['phy:/dev/server/smeserver,hda1,w']
#disk = [ 'phy:/dev/xebian/smeserver,hda,w']
disk=['phy:/dev/xebian/sme_lv_swap,hda3,w',
'phy:/dev/xebian/sme_lv_root,hda2,w',
'phy:/dev/xebian/sme_lv_boot,hda1,w' ]
extra='ro root=/dev/hda2'
Boot your smeserver with console: xm create sme -c
you will get an error!
Solution for this is:
/usr/lib/xen-3.1.0-1/bin/lomount -diskimage /dev/xebian/smeserver -partition 2 /mnt/temp/
chroot /mnt/temp
You will get some error messages, maybe some could clarify them
mkinitrd --with=xenblk --with=xennet /tmp/initrd.img 2.6.9-55.0.9.ELxenU
How do I exit from the chroot? I closed the ssh session reopend it
Now copy the newly created initrd
/usr/lib/xen-3.1.0-1/bin/lomount -diskimage /dev/xebian/smeserver -partition 2 /mnt/temp/
cp /mnt/temp/tmp/initrd.img /var/lib/xen/smeserver/
and change in /etc/xen/smeserver the part with initrd:
make a comment on the first initrd row and uncomment the second initrd row
Now restart the sme machine: xm create sme -c
You will get a further error message that it cannot find the root and boot label
e2label /dev/hda2 /
e2label /dev/hda1 /boot
Now you should be able to run your SME Server:
Feel free to modify your DomU config, mine looks right now like this:
#sme server domu xen
path='/var/lib/xen/smeserver/'
kernel=path+'vmlinuz-2.6.9-55.0.9.ELxenU'
#ramdisk=path+'initrd-2.6.9-55.0.9.ELxenU.img'
ramdisk=path+'initrd.img'
memory = '264'
name = 'sme'
vif = ['mac=00:16:3E:3B:38:E6,bridge=intern' #this change is in generall necessary for Linux Distris that use udev, without this a new mac will be generated on every start of your Domu
disk=['phy:/dev/xebian/sme_lv_swap,hda3,w',
'phy:/dev/xebian/sme_lv_root,hda2,w',
'phy:/dev/xebian/sme_lv_boot,hda1,w' ]
extra='ro root=/dev/hda2'
#If you have additional CPU or DUal COres put these Lines into it:
cpus="0-1"
vcpus = 2
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
#This line is when you want to have an PCI device only in your DomU. Should be usefull for DVB-Cards for the MYTH-TV Fraktion or the for HFC-Cards for the Asterisk Users
pci= [ '0000:01:05.2']
You get the PCI-ID from a device with lspci
For Pcibackhide you also need to edit in your Dom0 the menu.lst and append the following:
pico /boot/grub/menu.lst
module /vmlinuz-... root=/dev/mapper/xebian-root ro BOO console=tty0 pciback.hide=(01:05.2)
now reboot your Dom0 and do a dmesg |grep pciback:
you should get the following line: pciback 0000:01:05.2: seizing device
Now start your DomU and do again a dmesg |grep pciback in your Dom0, you will notice the ollowing line:
pciback: vpci: 0000:01:05.2: assign to virtual slot 0
Right now i get the following error under SME in my DomU when i try lspci:
pcilib: Cannot open /proc/bus/pci
Maybe someone could help with this
If you want that your Dom0 uses only 128MB of your Ram edit ther kernel line in your menu.lst:
kernel /xen-3.1.0-1-i386-pae.gz vga=text-80x25 dom0_mem=128M
Hope this will help someone,
Regards Marco
P.S maybe this could end somehow in the Wiki it some users find it usefull