ia64/xen-unstable

view stubdom/README @ 19510:accf139b2eb9

tools/misc: Remove some obsolete scripts.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Apr 06 21:12:33 2009 +0100 (2009-04-06)
parents cc542ebe4853
children 855e2f5ddb67
line source
1 IOEMU stubdom
2 =============
4 This boosts HVM performance by putting ioemu in its own lightweight domain.
6 General Configuration
7 =====================
9 Due to a race between the creation of the IOEMU stubdomain itself and allocation
10 of video memory for the HVM domain, you need to avoid the need for ballooning,
11 by using the hypervisor dom0_mem= option for instance.
14 There is a sample configuration set in xmexample.hvm-stubdom and
15 xmexample.hvm-dm
17 In your HVM config "hvmconfig",
19 - use /usr/lib/xen/bin/stubdom-dm as dm script:
21 device_model = '/usr/lib/xen/bin/stubdom-dm'
23 - comment the disk statement:
25 #disk = [ 'file:/tmp/install.iso,hdc:cdrom,r', 'phy:/dev/sda6,hda,w', 'file:/tmp/test,hdb,r' ]
27 - disable anything related to dom0, like pty serial assignments
30 Create /etc/xen/hvmconfig-dm (where "hvmconfig" is the name of your HVM
31 guest) with
33 kernel = "/usr/lib/xen/boot/ioemu-stubdom.gz"
34 vif = [ '', 'ip=10.0.1.1,mac=aa:00:00:12:23:34']
35 disk = [ 'file:/tmp/install.iso,hdc:cdrom,r', 'phy:/dev/sda6,hda,w', 'file:/tmp/test,hdb,r' ]
37 where
38 - the first vif ('') is reserved for VNC (see below)
39 - 'ip=10.0.1.1,mac= etc...' is the same net configuration as in the hvmconfig
40 script,
41 - and disk = is the same block configuration as in the hvmconfig script.
43 Display Configuration
44 =====================
46 There are three posibilities
48 * Using SDL
50 - In hvmconfig, disable vnc and sdl:
52 vnc = 0
53 sdl = 0
55 - In hvmconfig-dm, set an sdl vfb:
57 vfb = [ 'type=sdl' ]
59 by default qemu will use sdl together with opengl for rendering, if
60 you do not want qemu to use opengl then also pass opengl=0:
62 vfb = [ 'type=sdl, opengl=0' ]
64 * Using a VNC server in the stub domain
66 - In hvmconfig, set vnclisten to "172.30.206.1" for instance. Do not use a
67 host name as Mini-OS does not have a name resolver. Do not use 127.0.0.1 since
68 then you will not be able to connect to it.
70 vnc = 1
71 vnclisten = "172.30.206.1"
73 - In hvmconfig-dm, fill the reserved vif with the same IP, for instance:
75 vif = [ 'ip=172.30.206.1', 'ip=10.0.1.1,mac=aa:00:00:12:23:34']
77 * Using a VNC server in dom0
79 - In hvmconfig, disable vnc and sdl:
81 vnc = 0
82 sdl = 0
84 - In hvmconfig-dm, set a vnc vfb:
86 vfb = [ 'type=vnc' ]
88 and any other parameter as wished.
90 To run
91 ======
93 mkdir -p /exports/usr/share/xen/qemu
94 ln -s /usr/share/xen/qemu/keymaps /exports/usr/share/xen/qemu
95 mkdir -p /exports/var/lib
96 ln -s /var/lib/xen /exports/var/lib
97 /usr/sbin/fs-backend &
99 xm create hvmconfig
103 PV-GRUB
104 =======
106 This replaces pygrub to boot domU images safely: it runs the regular grub
107 inside the created domain itself and uses regular domU facilities to read the
108 disk / fetch files from network etc. ; it eventually loads the PV kernel and
109 chain-boots it.
111 Configuration
112 =============
114 In your PV config,
116 - use /usr/lib/xen/boot/pv-grub.gz as kernel:
118 kernel = "/usr/lib/xen/boot/pv-grub.gz"
120 - set the path to menu.lst, as seen from the domU, in extra:
122 extra = "(hd0,0)/boot/grub/menu.lst"
124 you can also use a tftp path (dhcp will be automatically performed):
126 extra = "(nd)/somepath/menu.lst"
128 or you can set it in option 150 of your dhcp server and leave extra empty
130 Limitations
131 ===========
133 - You can not boot a 64bit kernel with a 32bit-compiled PV-GRUB and vice-versa.
134 To cross-compile a 32bit PV-GRUB,
136 export XEN_TARGET_ARCH=x86_32
138 - bootsplash is supported, but the ioemu backend does not yet support restart
139 for use by the booted kernel.
142 Your own stubdom
143 ================
145 By running
147 cd stubdom/
148 make c-stubdom
150 or
152 cd stubdom/
153 make caml-stubdom
155 you can compile examples of C or caml stub domain kernels. You can use these
156 and the relevant Makefile rules as basis to build your own stub domain kernel.
157 Available libraries are libc, libxc, libxs, zlib and libpci.