ia64/xen-unstable

view tools/examples/xmexample.hvm @ 11029:bd04004865ba

[qemu] Add vncunused option.
If the port used for the requested display number is in use, try
additional ports until a free port is found.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author chris@kneesaa.uk.xensource.com
date Wed Aug 09 15:03:38 2006 +0100 (2006-08-09)
parents 92ef1215a6f1
children 0f917d63e960
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/hvmloader"
20 # The domain build function. HVM domain uses 'hvm'.
21 builder='hvm'
23 # Initial memory allocation (in megabytes) for the new domain.
24 #
25 # WARNING: Creating a domain with insufficient memory may cause out of
26 # memory errors. The domain needs enough memory to boot kernel
27 # and modules. Allocating less than 32MBs is not recommended.
28 memory = 128
30 # A name for your domain. All domains must have different names.
31 name = "ExampleHVMDomain"
33 # 128-bit UUID for the domain. The default behavior is to generate a new UUID
34 # on each call to 'xm create'.
35 #uuid = "06ed00fe-1162-4fc4-b5d8-11993ee4a8b9"
37 #-----------------------------------------------------------------------------
38 # the number of cpus guest platform has, default=1
39 #vcpus=1
41 # enable/disable HVM guest PAE, default=0 (disabled)
42 #pae=0
44 # enable/disable HVM guest ACPI, default=0 (disabled)
45 #acpi=0
47 # enable/disable HVM guest APIC, default=0 (disabled)
48 #apic=0
50 # List of which CPUS this domain is allowed to use, default Xen picks
51 #cpus = "" # leave to Xen to pick
52 #cpus = "0" # all vcpus run on CPU0
53 #cpus = "0-3,5,^1" # run on cpus 0,2,3,5
55 # Optionally define mac and/or bridge for the network interfaces.
56 # Random MACs are assigned if not given.
57 #vif = [ 'type=ioemu, mac=00:16:3e:00:00:11, bridge=xenbr0, model=ne2k_pci' ]
58 # type=ioemu specify the NIC is an ioemu device not netfront
59 vif = [ 'type=ioemu, bridge=xenbr0' ]
61 #----------------------------------------------------------------------------
62 # Define the disk devices you want the domain to have access to, and
63 # what you want them accessible as.
64 # Each disk entry is of the form phy:UNAME,DEV,MODE
65 # where UNAME is the device, DEV is the device name the domain will see,
66 # and MODE is r for read-only, w for read-write.
68 #disk = [ 'phy:hda1,hda1,r' ]
69 disk = [ 'file:/var/images/min-el3-i386.img,hda,w', ',hdc:cdrom,r' ]
71 #----------------------------------------------------------------------------
72 # Configure the behaviour when a domain exits. There are three 'reasons'
73 # for a domain to stop: poweroff, reboot, and crash. For each of these you
74 # may specify:
75 #
76 # "destroy", meaning that the domain is cleaned up as normal;
77 # "restart", meaning that a new domain is started in place of the old
78 # one;
79 # "preserve", meaning that no clean-up is done until the domain is
80 # manually destroyed (using xm destroy, for example); or
81 # "rename-restart", meaning that the old domain is not cleaned up, but is
82 # renamed and a new domain started in its place.
83 #
84 # The default is
85 #
86 # on_poweroff = 'destroy'
87 # on_reboot = 'restart'
88 # on_crash = 'restart'
89 #
90 # For backwards compatibility we also support the deprecated option restart
91 #
92 # restart = 'onreboot' means on_poweroff = 'destroy'
93 # on_reboot = 'restart'
94 # on_crash = 'destroy'
95 #
96 # restart = 'always' means on_poweroff = 'restart'
97 # on_reboot = 'restart'
98 # on_crash = 'restart'
99 #
100 # restart = 'never' means on_poweroff = 'destroy'
101 # on_reboot = 'destroy'
102 # on_crash = 'destroy'
104 #on_poweroff = 'destroy'
105 #on_reboot = 'restart'
106 #on_crash = 'restart'
108 #============================================================================
110 # New stuff
111 device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'
113 #-----------------------------------------------------------------------------
114 # boot on floppy (a), hard disk (c) or CD-ROM (d)
115 #boot=[a|c|d]
116 #-----------------------------------------------------------------------------
117 # write to temporary files instead of disk image files
118 #snapshot=1
120 #----------------------------------------------------------------------------
121 # enable SDL library for graphics, default = 0
122 sdl=0
124 #----------------------------------------------------------------------------
125 # enable VNC library for graphics, default = 1
126 vnc=1
128 #----------------------------------------------------------------------------
129 # set VNC display number, default = domid
130 #vncdisplay=1
132 #----------------------------------------------------------------------------
133 # try to find an unused port for the VNC server, default = 1
134 #vncunused=1
136 #----------------------------------------------------------------------------
137 # enable spawning vncviewer for domain's console
138 # (only valid when vnc=1), default = 0
139 #vncconsole=0
141 #----------------------------------------------------------------------------
142 # no graphics, use serial port
143 #nographic=0
145 #----------------------------------------------------------------------------
146 # enable stdvga, default = 0 (use cirrus logic device model)
147 stdvga=0
149 #-----------------------------------------------------------------------------
150 # serial port re-direct to pty deivce, /dev/pts/n
151 # then xm console or minicom can connect
152 serial='pty'
155 #-----------------------------------------------------------------------------
156 # enable sound card support, [sb16|es1370|all|..,..], default none
157 #soundhw='sb16'
160 #-----------------------------------------------------------------------------
161 # set the real time clock to local time [default=0 i.e. set to utc]
162 #localtime=1
165 #-----------------------------------------------------------------------------
166 # start in full screen
167 #full-screen=1
170 #-----------------------------------------------------------------------------
171 # Enable USB support (specific devices specified at runtime through the
172 # monitor window)
173 #usb=1
175 # Enable USB mouse support (only enable one of the following, `mouse' for
176 # PS/2 protocol relative mouse, `tablet' for
177 # absolute mouse)
178 #usbdevice='mouse'
179 #usbdevice='tablet'