ia64/xen-unstable

view tools/examples/xmexample.hvm @ 19835:edfdeb150f27

Fix buildsystem to detect udev > version 124

udev removed the udevinfo symlink from versions higher than 123 and
xen's build-system could not detect if udev is in place and has the
required version.

Signed-off-by: Marc-A. Dahlhaus <mad@wol.de>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 25 13:02:37 2009 +0100 (2009-06-25)
parents b51f9542ab14
children
line source
1 # -*- mode: python; -*-
2 #============================================================================
3 # Python configuration setup for 'xm create'.
4 # This script sets the parameters used when a domain is created using 'xm create'.
5 # You use a separate script for each domain you want to create, or
6 # you can set the parameters for the domain on the xm command line.
7 #============================================================================
9 #----------------------------------------------------------------------------
10 # Kernel image file.
11 kernel = "hvmloader"
13 # The domain build function. HVM domain uses 'hvm'.
14 builder='hvm'
16 # Initial memory allocation (in megabytes) for the new domain.
17 #
18 # WARNING: Creating a domain with insufficient memory may cause out of
19 # memory errors. The domain needs enough memory to boot kernel
20 # and modules. Allocating less than 32MBs is not recommended.
21 memory = 128
23 # Shadow pagetable memory for the domain, in MB.
24 # If not explicictly set, xend will pick an appropriate value.
25 # Should be at least 2KB per MB of domain memory, plus a few MB per vcpu.
26 # shadow_memory = 8
28 # A name for your domain. All domains must have different names.
29 name = "ExampleHVMDomain"
31 # 128-bit UUID for the domain. The default behavior is to generate a new UUID
32 # on each call to 'xm create'.
33 #uuid = "06ed00fe-1162-4fc4-b5d8-11993ee4a8b9"
35 #-----------------------------------------------------------------------------
36 # The number of cpus guest platform has, default=1
37 #vcpus=1
39 # Enable/disable HVM guest PAE, default=1 (enabled)
40 #pae=1
42 # Enable/disable HVM guest ACPI, default=1 (enabled)
43 #acpi=1
45 # Enable/disable HVM APIC mode, default=1 (enabled)
46 # Note that this option is ignored if vcpus > 1
47 #apic=1
49 # Enable/disable extended power management support within HVM guest, i.e., beyond
50 # S3, S4, S5 within guest like exposing battery meter.
51 # 0 (default option, extended power management support disabled)
52 # 1 (pass-through mode; uses pass-through as needed; efficient but limited in scope)
53 # 2 (non pass-through mode; extended scope, likely to work on all applicable environment
54 # but comparitively less efficient than pass-through mode)
55 # xen_extended_power_mgmt=0
57 # List of which CPUS this domain is allowed to use, default Xen picks
58 #cpus = "" # leave to Xen to pick
59 #cpus = "0" # all vcpus run on CPU0
60 #cpus = "0-3,5,^1" # all vcpus run on cpus 0,2,3,5
61 #cpus = ["2", "3"] # VCPU0 runs on CPU2, VCPU1 runs on CPU3
63 # Optionally define mac and/or bridge for the network interfaces.
64 # Random MACs are assigned if not given.
65 #vif = [ 'type=ioemu, mac=00:16:3e:00:00:11, bridge=xenbr0, model=ne2k_pci' ]
66 # type=ioemu specify the NIC is an ioemu device not netfront
67 vif = [ 'type=ioemu, bridge=xenbr0' ]
69 #----------------------------------------------------------------------------
70 # Define the disk devices you want the domain to have access to, and
71 # what you want them accessible as.
72 # Each disk entry is of the form phy:UNAME,DEV,MODE
73 # where UNAME is the device, DEV is the device name the domain will see,
74 # and MODE is r for read-only, w for read-write.
76 #disk = [ 'phy:hda1,hda1,r' ]
77 disk = [ 'file:/var/images/min-el3-i386.img,hda,w', ',hdc:cdrom,r' ]
79 #----------------------------------------------------------------------------
80 # Configure the behaviour when a domain exits. There are three 'reasons'
81 # for a domain to stop: poweroff, reboot, and crash. For each of these you
82 # may specify:
83 #
84 # "destroy", meaning that the domain is cleaned up as normal;
85 # "restart", meaning that a new domain is started in place of the old
86 # one;
87 # "preserve", meaning that no clean-up is done until the domain is
88 # manually destroyed (using xm destroy, for example); or
89 # "rename-restart", meaning that the old domain is not cleaned up, but is
90 # renamed and a new domain started in its place.
91 #
92 # In the event a domain stops due to a crash, you have the additional options:
93 #
94 # "coredump-destroy", meaning dump the crashed domain's core and then destroy;
95 # "coredump-restart', meaning dump the crashed domain's core and the restart.
96 #
97 # The default is
98 #
99 # on_poweroff = 'destroy'
100 # on_reboot = 'restart'
101 # on_crash = 'restart'
102 #
103 # For backwards compatibility we also support the deprecated option restart
104 #
105 # restart = 'onreboot' means on_poweroff = 'destroy'
106 # on_reboot = 'restart'
107 # on_crash = 'destroy'
108 #
109 # restart = 'always' means on_poweroff = 'restart'
110 # on_reboot = 'restart'
111 # on_crash = 'restart'
112 #
113 # restart = 'never' means on_poweroff = 'destroy'
114 # on_reboot = 'destroy'
115 # on_crash = 'destroy'
117 #on_poweroff = 'destroy'
118 #on_reboot = 'restart'
119 #on_crash = 'restart'
121 #============================================================================
123 # Device Model to be used
124 device_model = 'qemu-dm'
126 #-----------------------------------------------------------------------------
127 # boot on floppy (a), hard disk (c), Network (n) or CD-ROM (d)
128 # default: hard disk, cd-rom, floppy
129 #boot="cda"
131 #-----------------------------------------------------------------------------
132 # write to temporary files instead of disk image files
133 #snapshot=1
135 #----------------------------------------------------------------------------
136 # enable SDL library for graphics, default = 0
137 sdl=0
139 #----------------------------------------------------------------------------
140 # enable OpenGL for texture rendering inside the SDL window, default = 1
141 # valid only if sdl is enabled.
142 opengl=1
144 #----------------------------------------------------------------------------
145 # enable VNC library for graphics, default = 1
146 vnc=1
148 #----------------------------------------------------------------------------
149 # address that should be listened on for the VNC server if vnc is set.
150 # default is to use 'vnc-listen' setting from
151 # auxbin.xen_configdir() + /xend-config.sxp
152 #vnclisten="127.0.0.1"
154 #----------------------------------------------------------------------------
155 # set VNC display number, default = domid
156 #vncdisplay=1
158 #----------------------------------------------------------------------------
159 # try to find an unused port for the VNC server, default = 1
160 #vncunused=1
162 #----------------------------------------------------------------------------
163 # set password for domain's VNC console
164 # default is depents on vncpasswd in xend-config.sxp
165 vncpasswd=''
167 #----------------------------------------------------------------------------
168 # no graphics, use serial port
169 #nographic=0
171 #----------------------------------------------------------------------------
172 # enable stdvga, default = 0 (use cirrus logic device model)
173 stdvga=0
175 #-----------------------------------------------------------------------------
176 # serial port re-direct to pty deivce, /dev/pts/n
177 # then xm console or minicom can connect
178 serial='pty'
181 #-----------------------------------------------------------------------------
182 # Qemu Monitor, default is disable
183 # Use ctrl-alt-2 to connect
184 #monitor=1
187 #-----------------------------------------------------------------------------
188 # enable sound card support, [sb16|es1370|all|..,..], default none
189 #soundhw='sb16'
192 #-----------------------------------------------------------------------------
193 # set the real time clock to local time [default=0 i.e. set to utc]
194 #localtime=1
197 #-----------------------------------------------------------------------------
198 # set the real time clock offset in seconds [default=0 i.e. same as dom0]
199 #rtc_timeoffset=3600
201 #-----------------------------------------------------------------------------
202 # start in full screen
203 #full-screen=1
206 #-----------------------------------------------------------------------------
207 # Enable USB support (specific devices specified at runtime through the
208 # monitor window)
209 #usb=1
211 # Enable USB mouse support (only enable one of the following, `mouse' for
212 # PS/2 protocol relative mouse, `tablet' for
213 # absolute mouse)
214 #usbdevice='mouse'
215 #usbdevice='tablet'
217 #-----------------------------------------------------------------------------
218 # Set keyboard layout, default is en-us keyboard.
219 #keymap='ja'
221 #-----------------------------------------------------------------------------
222 # Enable/disable xen platform PCI device, default=1 (enabled)
223 #xen_platform_pci=1
225 #-----------------------------------------------------------------------------
226 # Configure guest CPUID responses:
227 #
228 #cpuid=[ '1:ecx=xxxxxxxxxxx00xxxxxxxxxxxxxxxxxxx,
229 # eax=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ]
230 # - Unset the SSE4 features (CPUID.1[ECX][20-19])
231 # - Default behaviour for all other bits in ECX And EAX registers.
232 #
233 # Each successive character represent a lesser-significant bit:
234 # '1' -> force the corresponding bit to 1
235 # '0' -> force to 0
236 # 'x' -> Get a safe value (pass through and mask with the default policy)
237 # 'k' -> pass through the host bit value
238 # 's' -> as 'k' but preserve across save/restore and migration
239 #
240 # Expose to the guest multi-core cpu instead of multiple processors
241 # Example for intel, expose a 8-core processor :
242 #cpuid=['1:edx=xxx1xxxxxxxxxxxxxxxxxxxxxxxxxxxx,
243 # ebx=xxxxxxxx00010000xxxxxxxxxxxxxxxx',
244 # '4,0:eax=001111xxxxxxxxxxxxxxxxxxxxxxxxxx']
245 # - CPUID.1[EDX][HT] : Enable HT
246 # - CPUID.1[EBX] : Number of vcpus * 2
247 # - CPUID.4,0[EAX] : Number of vcpus * 2 - 1
248 #vcpus=8
249 #
250 # Example for amd, expose a 5-core processor :
251 # cpuid = ['1:ebx=xxxxxxxx00001010xxxxxxxxxxxxxxxx,
252 # edx=xxx1xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
253 # '0x80000001:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1x',
254 # '0x80000008:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxx001001']
255 # - CPUID.1[EBX] : Threads per Core * Cores per Socket (2 * #vcpus)
256 # - CPUID.1[EDX][HT] : Enable HT
257 # - CPUID.0x80000001[CmpLegacy] : Use legacy method
258 # - CPUID.0x80000008[ECX] : #vcpus * 2 - 1
259 #vcpus=5
260 #
261 # Downgrade the cpuid to make a better compatibility for migration :
262 # Look like a generic 686 :
263 # cpuid = [ '0:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0',
264 # '1:eax=0x06b1,
265 # ecx=xxxxxxxxxxx0000xx00xxx0000000xx0,
266 # edx=xxx00000xxxxxxx0xxxxxxxxx0xxxxxx',
267 # '4:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0',
268 # '0x80000000:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0']
269 # with the highest leaf
270 # - CPUID.0[EAX] : Set the highest leaf
271 # - CPUID.1[EAX] : 686
272 # - CPUID.1[ECX] : Mask some features
273 # - CPUID.1[EDX] : Mask some features
274 # - CPUID.4 : Reply like the highest leaf, in our case CPUID.3
275 # - CPUID.0x80000000 : No extension we are on a Pentium III, reply like the
276 # highest leaf (CPUID.3).
277 #
278 # Configure host CPUID consistency checks, which must be satisfied for this
279 # VM to be allowed to run on this host's processor type:
280 #cpuid_check=[ '1:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxx1xxxxx' ]
281 # - Host must have VMX feature flag set
282 #
283 # The format is similar to the above for 'cpuid':
284 # '1' -> the bit must be '1'
285 # '0' -> the bit must be '0'
286 # 'x' -> we don't care (do not check)
287 # 's' -> the bit must be the same as on the host that started this VM
289 #-----------------------------------------------------------------------------
290 # Configure passthrough PCI{,-X,e} devices:
291 #
292 # pci=[ '[SSSS:]BB:DD.F[,option1[,option2[...]]]', ... ]
293 #
294 # [SSSS]:BB:DD.F "bus segment:bus:device.function"(1) of the device to
295 # be assigned, bus segment is optional. All fields are
296 # in hexadecimal and no field should be longer than that
297 # as shown in the pattern. Successful assignment may need
298 # certain hardware support and additional configurations
299 # (e.g. VT-d, see docs/misc/vtd.txt for more details).
300 #
301 # (1) bus segment is sometimes also referred to as the PCI "domain",
302 # not to be confused with Xen domain.
303 #
304 #
305 # optionN per-device options in "key=val" format. Current
306 # available options are:
307 # - msitranslate=0|1
308 # per-device overriden of pci_msitranslate, see below
309 # - power_mgmt=0|1
310 # per-device overriden of pci_power_mgmt, see below
311 #
312 #pci=[ '07:00.0', '07:00.1' ]
314 # MSI-INTx translation for MSI capable devices:
315 #
316 # If it's set, Xen will enable MSI for the device that supports it even
317 # if the guest don't use MSI. In the case, an IO-APIC type interrupt will
318 # be injected to the guest every time a corresponding MSI message is
319 # received.
320 # If the guest enables MSI or MSI-X, the translation is automatically
321 # turned off.
322 #
323 #pci_msitranslate=1
325 # PCI Power Management:
326 #
327 # If it's set, the guest OS will be able to program D0-D3hot states of the
328 # PCI device for the purpose of low power consumption.
329 #
330 #pci_power_mgmt=0
332 #-----------------------------------------------------------------------------
333 # Configure PVSCSI devices:
334 #
335 #vscsi=[ 'PDEV, VDEV' ]
336 #
337 # PDEV gives physical SCSI device to be attached to specified guest
338 # domain by one of the following identifier format.
339 # - XX:XX:XX:XX (4-tuples with decimal notation which shows
340 # "host:channel:target:lun")
341 # - /dev/sdxx or sdx
342 # - /dev/stxx or stx
343 # - /dev/sgxx or sgx
344 # - result of 'scsi_id -gu -s'.
345 # ex. # scsi_id -gu -s /block/sdb
346 # 36000b5d0006a0000006a0257004c0000
347 #
348 # VDEV gives virtual SCSI device by 4-tuples (XX:XX:XX:XX) as
349 # which the specified guest domain recognize.
350 #
352 #vscsi = [ '/dev/sdx, 0:0:0:0' ]