ia64/xen-unstable

view tools/examples/xmexample1 @ 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 18eb059ae471
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 = "/boot/vmlinuz-2.6.10-xenU"
13 # Optional ramdisk.
14 #ramdisk = "/boot/initrd.gz"
16 # The domain build function. Default is 'linux'.
17 #builder='linux'
19 # Initial memory allocation (in megabytes) for the new domain.
20 memory = 64
22 # A name for your domain. All domains must have different names.
23 name = "ExampleDomain"
25 # Which CPU to start domain on?
26 #cpu = -1 # leave to Xen to pick
28 # Number of Virtual CPUS to use, default is 1
29 #vcpus = 1
31 #----------------------------------------------------------------------------
32 # Define network interfaces.
34 # Number of network interfaces. Default is 1.
35 #nics=1
37 # Optionally define mac and/or bridge for the network interfaces.
38 # Random MACs are assigned if not given.
39 #vif = [ 'mac=aa:00:00:00:00:11, bridge=xen-br0' ]
41 #----------------------------------------------------------------------------
42 # Define the disk devices you want the domain to have access to, and
43 # what you want them accessible as.
44 # Each disk entry is of the form phy:UNAME,DEV,MODE
45 # where UNAME is the device, DEV is the device name the domain will see,
46 # and MODE is r for read-only, w for read-write.
48 disk = [ 'phy:hda1,hda1,w' ]
50 #----------------------------------------------------------------------------
51 # Define to which TPM instance the user domain should communicate.
52 # The vtpm entry is of the form 'instance=INSTANCE,backend=DOM'
53 # where INSTANCE indicates the instance number of the TPM the VM
54 # should be talking to and DOM provides the domain where the backend
55 # is located.
56 # Note that no two virtual machines should try to connect to the same
57 # TPM instance. The handling of all TPM instances does require
58 # some management effort in so far that VM configration files (and thus
59 # a VM) should be associated with a TPM instance throughout the lifetime
60 # of the VM / VM configuration file. The instance number must be
61 # greater or equal to 1.
62 #vtpm = [ 'instance=1,backend=0' ]
64 #----------------------------------------------------------------------------
65 # Set the kernel command line for the new domain.
66 # You only need to define the IP parameters and hostname if the domain's
67 # IP config doesn't, e.g. in ifcfg-eth0 or via DHCP.
68 # You can use 'extra' to set the runlevel and custom environment
69 # variables used by custom rc scripts (e.g. VMID=, usr= ).
71 # Set if you want dhcp to allocate the IP address.
72 #dhcp="dhcp"
73 # Set netmask.
74 #netmask=
75 # Set default gateway.
76 #gateway=
77 # Set the hostname.
78 #hostname= "vm%d" % vmid
80 # Set root device.
81 root = "/dev/hda1 ro"
83 # Root device for nfs.
84 #root = "/dev/nfs"
85 # The nfs server.
86 #nfs_server = '169.254.1.0'
87 # Root directory on the nfs server.
88 #nfs_root = '/full/path/to/root/directory'
90 # Sets runlevel 4.
91 extra = "4"
93 #----------------------------------------------------------------------------
94 # Configure the behaviour when a domain exits. There are three 'reasons'
95 # for a domain to stop: poweroff, reboot, and crash. For each of these you
96 # may specify:
97 #
98 # "destroy", meaning that the domain is cleaned up as normal;
99 # "restart", meaning that a new domain is started in place of the old
100 # one;
101 # "preserve", meaning that no clean-up is done until the domain is
102 # manually destroyed (using xm destroy, for example); or
103 # "rename-restart", meaning that the old domain is not cleaned up, but is
104 # renamed and a new domain started in its place.
105 #
106 # The default is
107 #
108 # on_poweroff = 'destroy'
109 # on_reboot = 'restart'
110 # on_crash = 'restart'
111 #
112 # For backwards compatibility we also support the deprecated option restart
113 #
114 # restart = 'onreboot' means on_poweroff = 'destroy'
115 # on_reboot = 'restart'
116 # on_crash = 'destroy'
117 #
118 # restart = 'always' means on_poweroff = 'restart'
119 # on_reboot = 'restart'
120 # on_crash = 'restart'
121 #
122 # restart = 'never' means on_poweroff = 'destroy'
123 # on_reboot = 'destroy'
124 # on_crash = 'destroy'
126 #on_poweroff = 'destroy'
127 #on_reboot = 'restart'
128 #on_crash = 'restart'
130 #============================================================================