view docs/man/xmdomain.cfg.pod.5 @ 11430:0419253c81de

Fix inverted sense of getRequiredAvailableMemory and
getRequiredInitialReservation on x86 HVM.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Tue Sep 05 16:23:11 2006 +0100 (2006-09-05)
parents cb70d4f8d718
children e798c9010e93
line source
1 =head1 NAME
3 xmdomain.cfg - xm domain config file format
5 =head1 SYNOPSIS
7 /etc/xen/myxendomain
8 /etc/xen/myxendomain2
9 /etc/xen/auto/myxenautostarted
13 The B<xm>(1) program uses python executable config files to define
14 domains to create from scratch. Each of these config files needs to
15 contain a number of required options, and may specify many more.
17 Domain configuration files live in /etc/xen by default, if you store
18 config files anywhere else the full path to the config file must be
19 specified in the I<xm create> command.
21 /etc/xen/auto is a special case. Domain config files in that
22 directory will be started automatically at system boot if the
23 xendomain init script is enabled. The contents of /etc/xen/auto
24 should be symlinks to files in /etc/xen to allow I<xm create> to be
25 used without full paths.
27 Options are specified by I<name = value> statements in the
28 xmdomain.cfg files.
30 =head1 OPTIONS
32 The following lists the most commonly used options for a domain config
33 file.
35 =over 4
37 =item B<kernel>
39 The kernel image for the domain. The format of the parameter is the
40 fully qualified path to the kernel image file,
41 i.e. I</boot/vmlinuz-2.6.12-xenU>.
44 =item B<ramdisk>
46 The initial ramdisk for the domain. The format of the parameter is
47 the fully qualified path to the initrd, i.e. I</boot/initrd.gz>. On
48 many Linux distros you will not need a ramdisk if using the default
49 xen kernel.
51 =item B<memory>
53 The amount of RAM, in megabytes, to allocate to the domain when it
54 starts. Allocating insufficient memory for a domain may produce
55 extremely bizarre behavior. If there isn't enough free memory left on
56 the machine to fulfill this request, the domain will fail to start.
58 Xen does not support overcommit of memory, so the total memory of all
59 guests (+ 64 MB needed for Xen) must be less than or equal to the
60 physical RAM in the machine.
62 =item B<name>
64 A unique name for the domain. Attempting to create two domains with
65 the same name will cause an error.
67 =item B<root>
69 Specifies the root device for the domain. This is required for Linux
70 domains, and possibly other OSes.
72 =item B<nics>
74 The number of network interfaces allocated to the domain on boot. It
75 defaults to 1.
77 =item B<disk>
79 An array of block device stanzas, in the form:
81 disk = [ "stanza1", "stanza2", ... ]
83 Each stanza has 3 terms, separated by commas,
84 "backend-dev,frontend-dev,mode".
86 =over 4
88 =item I<backend-dev>
90 The device in the backend domain that will be exported to the guest
91 (frontend) domain. Supported formats include:
93 I<phy:device> - export the physical device listed. The device can be
94 in symbolic form, as in sda7, or as the hex major/minor number, as in
95 0x301 (which is hda1).
97 I<file://path/to/file> - export the file listed as a loopback device.
98 This will take care of the loopback setup before exporting the device.
100 =item I<frontend-dev>
102 How the device should appear in the guest domain. The device can be
103 in symbolic form, as in sda7, or as the hex major/minor number, as in
104 0x301 (which is hda1).
106 =item I<mode>
108 The access mode for the device. There are currently 2 valid options,
109 I<r> (read-only), I<w> (read/write).
111 =back
113 =item B<vif>
115 An array of virtual interface stanzas in the form:
117 vif = [ "stanza1", "stanza2", ... ]
119 Each stanza specifies a set of I<name = value> options separated by
120 commas, in the form: "name1=value1, name2=value2, ..."
124 =over 4
126 =item I<bridge>
128 The network bridge to be used for this device. This is especially
129 needed if multiple bridges exist on the machine.
131 =item I<mac>
133 The MAC address for the virtual interface. If mac is not specified,
134 one will be randomly chosen by xen with the 00:16:3e vendor id prefix.
136 =back
138 =back
142 The following options are also supported in the config file, though
143 are far more rarely used.
145 =over 4
147 =item B<builder>
149 Which builder should be used to construct the domain. This defaults
150 to the I<linux> if not specified, which is the builder for
151 paravirtualized Linux domains.
153 =item B<cpu>
155 Specifies which CPU the domain should be started on, where 0 specifies
156 the first cpu, 1 the second, and so on. This defaults to -1, which
157 means Xen is free to pick which CPU to start on.
159 =item B<cpus>
161 Specifies a list of CPUs on which the domains' VCPUs are allowed to
162 execute upon. The syntax supports ranges (0-3), and negation, ^1.
163 For instance:
165 cpus = "0-3,5,^1"
167 Will result in CPUs 0, 2, 3, 5 being available for use by the domain.
169 =item B<extra>
171 Extra information to append to the end of the kernel parameter line.
172 The format is a string, the contents of which can be anything that the
173 kernel supports. For instance:
175 extra = "4"
177 Will cause the domain to boot to runlevel 4.
179 =item B<nfs_server>
181 The IP address of the NFS server to use as the root device for the
182 domain. In order to do this you'll need to specify I<root=/dev/nfs>,
183 and specify I<nfs_root>.
185 =item B<nfs_root>
187 The directory on the NFS server to be used as the root filesystem.
188 Specified as a fully qualified path, i.e. I</full/path/to/root/dir>.
190 =item B<vcpus>
192 The number of virtual cpus to allocate to the domain. In order to use
193 this the xen kernel must be compiled with SMP support.
195 This defaults to 1, meaning running the domain as a UP.
197 =back
201 There are 3 options which control domain shutdown (both planned and
202 unplanned) under certain events. The 3 events currently captured are:
204 =over 4
206 =item B<on_shutdown>
208 Triggered on either an I<xm shutdown> or graceful shutdown from inside
209 the DomU.
211 =item B<on_reboot>
213 Triggered on either an I<xm reboot> or graceful reboot from inside the
214 DomU.
216 =item B<on_crash>
218 Triggered when a DomU goes to the crashed state for any reason.
220 =back
222 All of them take one of 4 valid states listed below.
224 =over 4
226 =item B<destroy>
228 The domain will be cleaned up completely. No attempt at respawning
229 will occur. This is what a typical shutdown would look like.
231 =item B<restart>
233 The domain will be restarted with the same name as the old domain.
234 This is what a typical reboot would look like.
236 =item B<preserve>
238 The domain will not be cleaned up at all. This is often useful for
239 crash state domains which ensures that enough evidence is to debug the
240 real issue.
242 =item B<rename-restart>
244 The old domain will not be cleaned up, but will be renamed so a new
245 domain can be restarted in it's place. The old domain will be renamed with
246 a suffix -1, -2, etc, and assigned a new random UUID; the new domain will
247 keep the original name and UUID. The old domain will release the devices that
248 it holds, so that the new one may take them.
250 =back
252 =head1 EXAMPLES
254 The following are quick examples of ways that domains might be
255 configured. They should not be considered an exhaustive set.
257 =over 4
259 =item I<A Loopback File as Root>
261 kernel = "/boot/vmlinuz-2.6-xenU"
262 memory = 128
263 name = "MyLinux"
264 root = "/dev/hda1 ro"
265 disk = [ "file:/var/xen/mylinux.img,hda1,w" ]
267 This creates a domain called MyLinux with 128 MB of memory using a
268 default xen kernel, and the file /var/xen/mylinux.img loopback mounted
269 at hda1, which is the root filesystem.
271 =item I<NFS Root>
273 FIXME: write me
275 =item I<LVM Root>
277 FIXME: write me
279 =item I<Two Networks>
281 FIXME: write me
283 =back
285 =head1 SEE ALSO
287 B<xm>(1)
289 =head1 AUTHOR
291 Sean Dague <sean at dague dot net>
293 =head1 BUGS
295 Not all options are currently documented