ia64/xen-unstable

view tools/examples/xmexample.vmx @ 7238:971e7c7411b3

Raise an exception if an error appears on the pipes to our children, and make
sure that the child's pipes are closed even under that exception. Move the
handling of POLLHUP to the end of the loop, so that we guarantee to read any
remaining data from the child if POLLHUP and POLLIN appear at the same time.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Thu Oct 06 10:13:11 2005 +0100 (2005-10-06)
parents 244f1aa98d30
children 4e0c94871be2
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 import os, re
10 arch = os.uname()[4]
11 if re.search('64', arch):
12 arch_libdir = 'lib64'
13 else:
14 arch_libdir = 'lib'
16 #----------------------------------------------------------------------------
17 # Kernel image file.
18 kernel = "/usr/lib/xen/boot/vmxloader"
20 # The domain build function. VMX domain uses 'vmx'.
21 builder='vmx'
23 # Initial memory allocation (in megabytes) for the new domain.
24 memory = 128
26 # A name for your domain. All domains must have different names.
27 name = "ExampleVMXDomain"
29 #-----------------------------------------------------------------------------
30 # the number of cpus guest platform has, default=1
31 vcpus=1
33 # Which CPU to start domain on?
34 #cpu = -1 # leave to Xen to pick
36 # Optionally define mac and/or bridge for the network interfaces.
37 # Random MACs are assigned if not given.
38 #vif = [ 'mac=aa:00:00:00:00:11, bridge=xen-br0' ]
40 #----------------------------------------------------------------------------
41 # Define the disk devices you want the domain to have access to, and
42 # what you want them accessible as.
43 # Each disk entry is of the form phy:UNAME,DEV,MODE
44 # where UNAME is the device, DEV is the device name the domain will see,
45 # and MODE is r for read-only, w for read-write.
47 #disk = [ 'phy:hda1,hda1,r' ]
48 disk = [ 'file:/var/images/min-el3-i386.img,ioemu:hda,w' ]
50 #----------------------------------------------------------------------------
51 # Configure the behaviour when a domain exits. There are three 'reasons'
52 # for a domain to stop: poweroff, reboot, and crash. For each of these you
53 # may specify:
54 #
55 # "destroy", meaning that the domain is cleaned up as normal;
56 # "restart", meaning that a new domain is started in place of the old
57 # one;
58 # "preserve", meaning that no clean-up is done until the domain is
59 # manually destroyed (using xm destroy, for example); or
60 # "rename-restart", meaning that the old domain is not cleaned up, but is
61 # renamed and a new domain started in its place.
62 #
63 # The default is
64 #
65 # on_poweroff = 'destroy'
66 # on_reboot = 'restart'
67 # on_crash = 'restart'
68 #
69 # For backwards compatibility we also support the deprecated option restart
70 #
71 # restart = 'onreboot' means on_poweroff = 'destroy'
72 # on_reboot = 'restart'
73 # on_crash = 'destroy'
74 #
75 # restart = 'always' means on_poweroff = 'restart'
76 # on_reboot = 'restart'
77 # on_crash = 'restart'
78 #
79 # restart = 'never' means on_poweroff = 'destroy'
80 # on_reboot = 'destroy'
81 # on_crash = 'destroy'
83 #on_poweroff = 'destroy'
84 #on_reboot = 'restart'
85 #on_crash = 'restart'
87 #============================================================================
89 # New stuff
90 device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'
92 #-----------------------------------------------------------------------------
93 # Disk image for
94 #cdrom=
96 #-----------------------------------------------------------------------------
97 # boot on floppy (a), hard disk (c) or CD-ROM (d)
98 #boot=[a|c|d]
99 #-----------------------------------------------------------------------------
100 # write to temporary files instead of disk image files
101 #snapshot=1
103 #----------------------------------------------------------------------------
104 # enable SDL library for graphics, default = 0
105 sdl=0
107 #----------------------------------------------------------------------------
108 # enable VNC library for graphics, default = 1
109 vnc=1
111 #----------------------------------------------------------------------------
112 # enable spawning vncviewer(only valid when vnc=1), default = 1
113 vncviewer=1
115 #----------------------------------------------------------------------------
116 # no graphics, use serial port
117 #nographic=0
120 #-----------------------------------------------------------------------------
121 # enable audio support
122 #enable-audio=1
125 #-----------------------------------------------------------------------------
126 # set the real time clock to local time [default=0 i.e. set to utc]
127 #localtime=1
130 #-----------------------------------------------------------------------------
131 # start in full screen
132 #full-screen=1