source: trunk/packages/xen-common/xen-common/docs/man/xmdomain.cfg.pod.5 @ 34

Last change on this file since 34 was 34, checked in by hartmans, 17 years ago

Add xen and xen-common

File size: 8.2 KB
Line 
1=head1 NAME
2
3xmdomain.cfg - xm domain config file format
4
5=head1 SYNOPSIS
6
7 /etc/xen/myxendomain
8 /etc/xen/myxendomain2
9 /etc/xen/auto/myxenautostarted
10
11=head1 DESCRIPTION
12
13The B<xm>(1) program uses python executable config files to define
14domains to create from scratch.  Each of these config files needs to
15contain a number of required options, and may specify many more.
16
17Domain configuration files live in /etc/xen by default, if you store
18config files anywhere else the full path to the config file must be
19specified in the I<xm create> command.
20
21/etc/xen/auto is a special case.  Domain config files in that
22directory will be started automatically at system boot if the
23xendomain init script is enabled.  The contents of /etc/xen/auto
24should be symlinks to files in /etc/xen to allow I<xm create> to be
25used without full paths.
26
27Options are specified by I<name = value> statements in the
28xmdomain.cfg files.
29
30=head1 OPTIONS
31
32The following lists the most commonly used options for a domain config
33file. 
34
35=over 4
36
37=item B<kernel>
38
39The kernel image for the domain.  The format of the parameter is the
40fully qualified path to the kernel image file,
41i.e. I</boot/vmlinuz-2.6.12-xenU>.
42
43
44=item B<ramdisk>
45
46The initial ramdisk for the domain.  The format of the parameter is
47the fully qualified path to the initrd, i.e. I</boot/initrd.gz>.  On
48many Linux distros you will not need a ramdisk if using the default
49xen kernel.
50
51=item B<memory>
52
53The amount of RAM, in megabytes, to allocate to the domain when it
54starts.  Allocating insufficient memory for a domain may produce
55extremely bizarre behavior.  If there isn't enough free memory left on
56the machine to fulfill this request, the domain will fail to start.
57
58Xen does not support overcommit of memory, so the total memory of all
59guests (+ 64 MB needed for Xen) must be less than or equal to the
60physical RAM in the machine.
61
62=item B<name>
63
64A unique name for the domain.  Attempting to create two domains with
65the same name will cause an error.
66
67=item B<root>
68
69Specifies the root device for the domain.  This is required for Linux
70domains, and possibly other OSes.
71
72=item B<nics>
73
74The number of network interfaces allocated to the domain on boot.  It
75defaults to 1.
76
77=item B<disk>
78
79An array of block device stanzas, in the form:
80
81    disk = [ "stanza1", "stanza2", ... ]
82
83Each stanza has 3 terms, separated by commas,
84"backend-dev,frontend-dev,mode".
85
86=over 4
87
88=item I<backend-dev>
89
90The device in the backend domain that will be exported to the guest
91(frontend) domain.  Supported formats include:
92
93I<phy:device> - export the physical device listed.  The device can be
94in symbolic form, as in sda7, or as the hex major/minor number, as in
950x301 (which is hda1).
96
97I<file://path/to/file> - export the file listed as a loopback device.
98This will take care of the loopback setup before exporting the device.
99
100=item I<frontend-dev>
101
102How the device should appear in the guest domain.  The device can be
103in symbolic form, as in sda7, or as the hex major/minor number, as in
1040x301 (which is hda1).
105
106=item I<mode>
107
108The access mode for the device.  There are currently 2 valid options,
109I<r> (read-only), I<w> (read/write).
110
111=back
112
113=item B<vif>
114
115An array of virtual interface stanzas in the form:
116
117    vif = [ "stanza1", "stanza2", ... ]
118
119Each stanza specifies a set of I<name = value> options separated by
120commas, in the form: "name1=value1, name2=value2, ..."
121
122B<OPTIONS>
123
124=over 4
125
126=item I<bridge>
127
128The network bridge to be used for this device.  This is especially
129needed if multiple bridges exist on the machine.
130
131=item I<mac>
132
133The MAC address for the virtual interface.  If mac is not specified,
134one will be randomly chosen by xen with the 00:16:3e vendor id prefix.
135
136=back
137
138=item B<vfb>
139
140A virtual frame buffer stanza in the form:
141
142    vfb = [ "stanza" ]
143
144The stanza specifies a set of I<name = value> options separated by
145commas, in the form: "name1=value1, name2=value2, ..."
146
147B<OPTIONS>
148
149=over 4
150
151=item I<type>
152
153There are currently two valid options: I<vnc> starts a VNC server that
154lets you connect an external VNC viewer, and I<sdl> starts an internal
155viewer.
156
157=item I<vncdisplay>
158
159The VNC display number to use, defaults to the domain ID.  The
160VNC server listens on port 5900 + display number.
161
162=item I<vnclisten>
163
164The listening address for the VNC server, default 127.0.0.1.
165
166=item I<vncunused>
167
168If non-zero, the VNC server listens on the first unused port above
1695900.
170
171=item I<vncpasswd>
172
173Overrides the XenD configured default password.
174
175=item I<display>
176
177Display to use for the internal viewer, defaults to environment
178variable I<DISPLAY>.
179
180=item I<xauthority>
181
182Authority file to use for the internal viewer, defaults to environment
183variable I<XAUTHORITY>.
184
185=back
186
187=back
188
189=head1 ADDITIONAL OPTIONS
190
191The following options are also supported in the config file, though
192are far more rarely used.
193
194=over 4
195
196=item B<builder>
197
198Which builder should be used to construct the domain.  This defaults
199to the I<linux> if not specified, which is the builder for
200paravirtualized Linux domains.
201
202=item B<cpu>
203
204Specifies which CPU the domain should be started on, where 0 specifies
205the first cpu, 1 the second, and so on.  This defaults to -1, which
206means Xen is free to pick which CPU to start on.
207
208=item B<cpus>
209
210Specifies a list of CPUs on which the domains' VCPUs are allowed to
211execute upon.  The syntax supports ranges (0-3), and negation, ^1.
212For instance:
213
214    cpus = "0-3,5,^1"
215
216Will result in CPUs 0, 2, 3, 5 being available for use by the domain.
217
218=item B<extra>
219
220Extra information to append to the end of the kernel parameter line.
221The format is a string, the contents of which can be anything that the
222kernel supports.  For instance:
223
224    extra = "4"
225
226Will cause the domain to boot to runlevel 4.
227
228=item B<nfs_server>
229
230The IP address of the NFS server to use as the root device for the
231domain.  In order to do this you'll need to specify I<root=/dev/nfs>,
232and specify I<nfs_root>.
233
234=item B<nfs_root>
235
236The directory on the NFS server to be used as the root filesystem.
237Specified as a fully qualified path, i.e. I</full/path/to/root/dir>.
238
239=item B<vcpus>
240
241The number of virtual cpus to allocate to the domain.  In order to use
242this the xen kernel must be compiled with SMP support.
243
244This defaults to 1, meaning running the domain as a UP.
245
246=back
247
248=head1 DOMAIN SHUTDOWN OPTIONS
249
250There are 3 options which control domain shutdown (both planned and
251unplanned) under certain events.  The 3 events currently captured are:
252
253=over 4
254
255=item B<on_shutdown>
256
257Triggered on either an I<xm shutdown> or graceful shutdown from inside
258the DomU.
259
260=item B<on_reboot>
261
262Triggered on either an I<xm reboot> or graceful reboot from inside the
263DomU.
264
265=item B<on_crash>
266
267Triggered when a DomU goes to the crashed state for any reason.
268
269=back
270
271All of them take one of 4 valid states listed below. 
272
273=over 4
274
275=item B<destroy>
276
277The domain will be cleaned up completely.  No attempt at respawning
278will occur.  This is what a typical shutdown would look like.
279
280=item B<restart>
281
282The domain will be restarted with the same name as the old domain.
283This is what a typical reboot would look like.
284
285=item B<preserve>
286
287The domain will not be cleaned up at all.  This is often useful for
288crash state domains which ensures that enough evidence is to debug the
289real issue.
290
291=item B<rename-restart>
292
293The old domain will not be cleaned up, but will be renamed so a new
294domain can be restarted in it's place.  The old domain will be renamed with
295a suffix -1, -2, etc, and assigned a new random UUID; the new domain will
296keep the original name and UUID.  The old domain will release the devices that
297it holds, so that the new one may take them.
298
299=back
300
301=head1 EXAMPLES
302
303The following are quick examples of ways that domains might be
304configured.  They should not be considered an exhaustive set.
305
306=over 4
307
308=item I<A Loopback File as Root>
309
310    kernel = "/boot/vmlinuz-2.6-xenU"
311    memory = 128
312    name = "MyLinux"     
313    root = "/dev/hda1 ro"
314    disk = [ "file:/var/xen/mylinux.img,hda1,w" ]
315
316This creates a domain called MyLinux with 128 MB of memory using a
317default xen kernel, and the file /var/xen/mylinux.img loopback mounted
318at hda1, which is the root filesystem.
319
320=item I<NFS Root>
321
322FIXME: write me
323
324=item I<LVM Root>
325
326FIXME: write me
327
328=item I<Two Networks>
329
330FIXME: write me
331
332=back
333
334=head1 SEE ALSO
335
336B<xm>(1)
337
338=head1 AUTHOR
339
340  Sean Dague <sean at dague dot net>
341
342=head1 BUGS
343
344Not all options are currently documented
Note: See TracBrowser for help on using the repository browser.