Hallo,
ich bin auf der Suche nach jemandem, der Erfahrung mit der Einrichtung von o.g. Konfiguration hat.
Ich habe den Ubuntu-Server und darauf Xen installiert:
|
Quellcode
|
1
|
sudo apt-get install xen-hypervisor-4.1-amd64
|
In der /etc/default/grub:
|
Quellcode
|
1
|
GRUB_DEFAULT=’Xen 4.1-amd64′
|
und danach
|
Quellcode
|
1
|
sudo update-grub
|
funktionierte klaglos.
Ab jetzt allerdings bin ich ratlos. Es wird empfohlen als Toolstack xl anstatt xm zu verwenden, da letzteres mit der nächsten Xen-Version veraltet sein wird. Jetzt (Xen 4.1) ist allerdings noch xm Standard, wie es scheint:
|
Quellcode
|
1
2
3
4
5
|
xl list
ERROR: A different toolstack (xm) have been selected!
xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 11460 16 r----- 931.8
|
Ich habe jetzt in etc/default/xen xl also toolstack eingetragen:
|
Quellcode
|
1
|
TOOLSTACK=xl
|
nach dem reboot gibts folgende Ausgaben:
|
Quellcode
|
1
2
3
4
5
6
|
xm list
ERROR: A different toolstack (xl) have been selected!
xl list
Name ID Mem VCPUs State Time(s)
Domain-0 0 11460 16 r----- 15.8
|
Das schaut ja gut aus, oder?
Allerdings scheint xend noch zu laufen:
|
Quellcode
|
1
2
3
4
5
6
7
8
9
|
root@instserv7:/home/bk# ps -aux | grep xen
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root 73 0.0 0.0 0 0 ? S 15:05 0:00 [xenwatch]
root 74 0.0 0.0 0 0 ? S 15:05 0:00 [xenbus]
root 1220 0.0 0.0 10920 964 ? S 15:05 0:00 /usr/lib/xen-4.1/bin/xenstored --pid-file=/var/run/xenstore.pid
root 1224 0.0 0.0 90684 620 ? SLl 15:05 0:00 /usr/lib/xen-4.1/bin/xenconsoled --pid-file=/var/run/xenconsoled.pid
root 1229 0.0 0.1 83960 12036 ? S 15:05 0:00 /usr/bin/python2.7 /usr/lib/xen-4.1/bin/xend start
root 1230 0.0 0.2 462388 23760 ? SLl 15:05 0:01 /usr/bin/python2.7 /usr/lib/xen-4.1/bin/xend start
root 2212 0.0 0.0 8352 932 pts/0 S+ 15:43 0:00 grep --color=auto xen
|
/edit:
OK, hab XEN jetzt zum Laufen gebracht. Bin dazu wie folgt vorgegangen:
Toolstack wieder auf xm gestellt
Xen tools installiert:
|
Quellcode
|
1
|
Apt-get install xen-tools
|
XEN Konfigfiles konfiguriert:
|
Quellcode
|
1
|
nano /etc/xen-tools/xen-tools.conf
|
Alles konfigurieren wie gewünscht, damit das selbe System wie Dom0 aufgesetzt wird:
|
Quellcode
|
1
|
install-method= debootstrap
|
|
Quellcode
|
1
2
|
nano
/etc/xen/xend-config.sxp
|
|
Quellcode
|
1
2
3
|
#(network-script network-bridge)
(vif-script vif-bridge)
|
Damit debootstrap funktioniert muss ein Link gesetzt werden,
da es noch kein precise.d gibt.
|
Quellcode
|
1
2
3
|
cd /usr/lib/xen-tools
ln -s
karmic.d precise.d
|
Bridging
konfigurieren:
|
Quellcode
|
1
|
nano /ect/network/interfaces
|
|
Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
auto eth0
iface eth0 inet static
auto xenbr0
iface xenbr0 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
network xxx.xxx.xxx.xxx
broadcast xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx
dns-nameservers xxx.xxx.xxx.xxx
bridge_ports eth0
bridge_stp off
bridge_fd 0
|
|
Quellcode
|
1
2
3
|
reboot now
xen-create-image
-- ip xxx.xxx.xxx.xxx -- hostname vm01
|
Nun wird die VM erstellt sowie das disk-image, swap-image und das
Konfigurationsfile
Das Konfig file liegt unter /etc/xen/vm01.cfg
Das Image liegt unter: /xen/domains/vm01/
Zum Booten der VM01:
|
Quellcode
|
1
|
xm create /etc/xen/vm01.cfg
|
Prüfen, ob sie läuft:
|
Quellcode
|
1
|
xm list
|
Von dom0 in die konsole von vm01 wechseln:
|
Quellcode
|
1
|
xm console 1
|
xen console verlassen:
STRG+ALTGR+ 5
Um nun eine neue VM anzulegen:
falls nötig (zb. andere Festplattengröße)
|
Quellcode
|
1
|
nano /etc/xen-tools/xen-tools.conf
|
danach:
|
Quellcode
|
1
2
3
4
|
xen-create-image
-- ip xxx.xxx.xxx.xxx -- hostname vmxx
xm
create /etc/xen/vmxx.cfg
|