Création des autres machines virtuelles
Pour faire simple, nous avons les configurations suivantes :
Voici les informations relatives à cette machine :
|
Interface |
Adresse ip |
Masque réseau |
Passerelle |
DOM_PUB |
||||
br_pub |
eth0 |
Static 172.16.50.1 |
255.255.255.0 |
172.16.50.254 |
DOM_PRIV |
||||
br_priv |
eth0 |
Static 172.16.100.1 |
255.255.255.0 |
172.16.100.254 |
Création de Dom_Priv
# lvcreate -L 2G -n vmdiskpriv vg # mkfs -t ext3 /dev/vg/vmdiskpriv # mount /dev/vg/vmdiskpriv /mnt # cp -ax /{root,dev,var,etc,usr,bin,sbin,lib} /mnt # mkdir /mnt/{proc,sys,home,tmp,cdrom} # sync # cd /mnt/etc # echo "dom_priv" > hostname # vi network/interfaces |
auto eth0 iface eth0 inet static address 172.16.50.1 netmask 255.255.255.0 gateway 172.16.50.254 |
# umount /mnt # vi /etc/xen/dom_priv [/TEXBOX]
[TEXTBOX] # xm create dom_priv # xm console dom_priv ..... dom_priv# vi /etc/rc.local |
Ajouter la ligne suivante : echo "jiffies" > /sys/devices/system/clocksource/clocksource0/current_clocksource
Création de Dom_Pub
# lvcreate -L 2G -n vmdiskub vg # mkfs -t ext3 /dev/vg/vmdiskpub # mount /dev/vg/vmdiskpriv /mnt # cp -ax /{root,dev,var,etc,usr,bin,sbin,lib} /mnt # mkdir /mnt/{proc,sys,home,tmp,cdrom} # sync # cd /mnt/etc # echo "dom_pub" > hostname # vi network/interfaces |
auto eth0 iface eth0 inet static address 172.16.100.1 netmask 255.255.255.0 gateway 172.16.100.254 |
# umount /mnt # vi /etc/xen/dom_pub |
name = "dom_pub" kernel = "/boot/vmlinuz-2.6.26-1-xen-686" ramdisk = "/boot/initrd.img-2.6.26-1-xen-686" root = "/dev/hda1 ro" cdrom='/dev/cdrom' disk = ['phy:/dev/vg/vmdiskpub,hda1,w'] memory = 128 extra = 'xencons=tty' vif=[ 'mac=00:16:3e:70:01:08, bridge=br_pub' ] |
# xm create dom_pub # xm console dom_pub ..... dom_priv# vi /etc/rc.local |
Ajouter la ligne suivante : echo "jiffies" > /sys/devices/system/clocksource/clocksource0/current_clocksource
Me contacter | ©2004-2005
Raum