Xen HowTo

in /etc/xen/xend-config.sxp

se c'e' solo 1 ethernet

con 2 ethernet

 #!/bin/sh

 # In /etc/xen/xend-config.sxp:
 # (network-script my-network-script)
 # they become translated into
 # "$dir/network-bridge" start/stop vifnum=0/1

 dir=$(dirname "$0")
 "$dir/network-bridge" "$@" vifnum=0
 "$dir/network-bridge" "$@" vifnum=1

e nel conf

in xen-tools

 lvm = vg01
 debootstrap = 1
 dist   = etch    # Default distribution to install.
 #
 # Uncomment and adjust these network settings if you wish to give your
 # new instances static IP addresses.
 #
 gateway   = <IP-GATEWAY>
 netmask   = <NETMASK>
 passwd = 1
 kernel = /boot/vmlinuz-2.6.18-4-xen-amd64 (o quello che si usa)
 initrd = /boot/initrd.img-2.6.18-4-xen-amd64 (o quello che si usa)
 mirror = http://ftp.it.debian.org/debian/

Crea la DomU

 export http_proxy="http://proxy:3128"
 xen-create-image --ip=<IP-DOMU> --hostname=<HOSTNAME-DomU>

Attiva la DomU

 xm create <HOSTNAME-DomU>.cfg

You can detach from a console using the escape character: <CTRL> ']'.

nb: sembra che con il multinet non para in automatico se prima nn si e' attivato i bridge a mano

sh scripts/my-network-bridge start

poi nella conf del DomU

vif  = [ 'ip=<IP-DOMU-eth0>,bridge=xenbr0','ip=<IP-DOMU-eth1>,bridge=xenbr1' ]

config della domU

Migrazione della DomU (asap)

attenzione se cambia il kernel dell'Host xen!

la DomU ha copiato la lib/modules del kernel che lo ha installato, se questo kernel non e' + presente nella Dom0 e' necessario copiare prima di avviare la DomU la nuova lib/modules e correggere il file di conf con la nuova rel. del kernel.

Auto Start di una DomU

nella dir /etc/xen crea la dir auto e symlink del file di config. della DomU.

xen1:/etc/xen# ls -la auto/
total 8
drwxr-xr-x 2 root root 4096 Jan 29 19:55 .
drwxr-xr-x 4 root root 4096 Mar  5 16:12 ..
lrwxrwxrwx 1 root root   24 Jan 29 19:55 DomU.cfg -> /etc/xen/DomU.cfg


CategoryDoc

TecnoBrain: XenConfiguration (last edited 2008-08-03 17:49:05 by EnricoRossi)

© Tecno Brain di Rossi Enrico, via G. Marcovigi 2 - 40133 Bologna (Italy) - P.IVA: 04275850370
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Al ike 2.5 Italy License.