The art of Xen

Bueno en realidad una pesadilla las xen-utils, xen-tools ayuda muchisimo, la parte compleja es lograr hacer que xm ponga los archivos donde uno quiere.

test 128MB RAM 1cpu 126MB swap. dhcp ;D

top - 22:22:39 up 8 min, 2 users, load average: 0.00, 0.00, 0.00
Tasks: 28 total, 2 running, 26 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 131072k total, 43348k used, 87724k free, 1688k buffers
Swap: 131064k total, 0k used, 131064k free, 10648k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 18 0 6120 680 560 S 0.0 0.5 0:00.06 init
2 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
4 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
5 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/0
6 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khelper
7 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
8 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 xenwatch
9 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 xenbus
15 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/0
19 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 khubd
21 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kseriod
63 root 25 0 0 0 0 S 0.0 0.0 0:00.00 pdflush
64 root 15 0 0 0 0 S 0.0 0.0 0:00.00 pdflush
65 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kswapd0
66 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0
641 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kjournald

xentop en el host

xentop - 17:23:05 Xen 3.0.3-1
2 domains: 1 running, 1 blocked, 0 paused, 0 crashed, 0 dying, 0 shutdown
Mem: 1046704k total, 1046144k used, 560k free CPUs: 2 @ 2793MHz
NAME STATE CPU(sec) CPU(%) MEM(k) MEM(%) MAXMEM(k) MAXMEM(%) VCPUS
NETS NETTX(k) NETRX(k) VBDS VBD_OO VBD_RD VBD_WR SSID
Domain-0 -----r 9801 199.9 886908 84.7 no limit n/a 2
4 6349 215300 0 0 0 0 0
test --b--- 3 0.1 130936 12.5 131072 12.5 1
1 29 58 2 0 705 355 0

top en el host (Domu0)

top - 17:24:04 up 1:24, 6 users, load average: 2.84, 2.97, 2.74
Tasks: 92 total, 4 running, 88 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 99.7%ni, 0.2%id, 0.0%wa, 0.0%hi, 0.0%si, 0.2%st
Mem: 886784k total, 664124k used, 222660k free, 21212k buffers
Swap: 3012148k total, 60k used, 3012088k free, 411760k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
8389 vicm3 39 19 73432 68m 12 R 100 7.9 21:01.60 setiathome-5.27
2594 vicm3 39 19 40616 36m 12 R 99 4.2 74:14.33 setiathome-5.27
1 root 18 0 6120 692 568 S 0 0.1 0:01.40 init
2 root RT 0 0 0 0 S 0 0.0 0:00.08 migration/0
3 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/0
4 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/0
5 root RT 0 0 0 0 S 0 0.0 0:00.10 migration/1
6 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/1
7 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/1
8 root 10 -5 0 0 0 S 0 0.0 0:00.08 events/0
9 root 10 -5 0 0 0 S 0 0.0 0:00.04 events/1
10 root 10 -5 0 0 0 S 0 0.0 0:00.00 khelper
11 root 11 -5 0 0 0 S 0 0.0 0:00.00 kthread
13 root 10 -5 0 0 0 S 0 0.0 0:00.01 xenwatch
14 root 10 -5 0 0 0 S 0 0.0 0:00.04 xenbus
17 root 10 -5 0 0 0 S 0 0.0 0:00.00 kblockd/0
18 root 10 -5 0 0 0 S 0 0.0 0:00.00 kblockd/1

Por cierto si lo quieren es echar a andar un xen olvidense del bonito libro de Prentice Hall:

"Running Xen: A Hands-On Guide to the Art of Virtualization by Jeanna N. Matthews; Eli M. Dow; Todd Deshane; Wenjin Hu; Jeremy Bongio; Patrick F. Wilbur; Brendan Johnson, Publisher: Prentice Hall, Pub Date: April 10, 2008"

En lo que he avanzado de su lectura no hay pista alguna que no sea con el livecd de xen... y yo lo quiero ya correr en mi maquina... para eso fuertemente recomiendo El manual del usuario de Xen + Xen-tools en Debian Administration por Steve Kemp. Lo que anduve perdido como 2 horas lo resolvio el xen-tools... en 15 minutos (lo que hacia debootstrap), ahora a entender como crea las configuraciones, por que ahi fue donde tuve mas problema, para mayor referencia en el manual de xen en myvmconf, por cierto el libro de prentice si van a la parte teorica fuerte de la paravirtualizacion y los recovecos, eso si es bien probable que queden mas conformes que yo (o que cuando termine de leerlo cambie de opinion).

Y si, esto parece un juguete divertido... poder crear instancias para que cada sistemita se rompa en ellas es bastante interesante, algunas repercusiones en cuanto a seguridad para considerar pero muy interesante el juguete.