ia64/xen-unstable

view tools/examples/xmexample.hvm @ 15873:7dfc9a7a0d4e

Xend: "shadow_memory" setting in xm config is in MiB, not bytes.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Tue Sep 11 12:30:39 2007 +0100 (2007-09-11)
parents 8f7f29f718a6
children 58e5e9ae0f8d
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 # Shadow pagetable memory for the domain, in MB.
31 # If not explicictly set, xend will pick an appropriate value.
32 # Should be at least 2KB per MB of domain memory, plus a few MB per vcpu.
33 # shadow_memory = 8
35 # A name for your domain. All domains must have different names.
36 name = "ExampleHVMDomain"
38 # 128-bit UUID for the domain. The default behavior is to generate a new UUID
39 # on each call to 'xm create'.
40 #uuid = "06ed00fe-1162-4fc4-b5d8-11993ee4a8b9"
42 #-----------------------------------------------------------------------------
43 # The number of cpus guest platform has, default=1
44 #vcpus=1
46 # Enable/disable HVM guest PAE, default=1 (enabled)
47 #pae=1
49 # Enable/disable HVM guest ACPI, default=1 (enabled)
50 #acpi=1
52 # Enable/disable HVM APIC mode, default=1 (enabled)
53 # Note that this option is ignored if vcpus > 1
54 #apic=1
56 # List of which CPUS this domain is allowed to use, default Xen picks
57 #cpus = "" # leave to Xen to pick
58 #cpus = "0" # all vcpus run on CPU0
59 #cpus = "0-3,5,^1" # run on cpus 0,2,3,5
61 # Optionally define mac and/or bridge for the network interfaces.
62 # Random MACs are assigned if not given.
63 #vif = [ 'type=ioemu, mac=00:16:3e:00:00:11, bridge=xenbr0, model=ne2k_pci' ]
64 # type=ioemu specify the NIC is an ioemu device not netfront
65 vif = [ 'type=ioemu, bridge=xenbr0' ]
67 #----------------------------------------------------------------------------
68 # Define the disk devices you want the domain to have access to, and
69 # what you want them accessible as.
70 # Each disk entry is of the form phy:UNAME,DEV,MODE
71 # where UNAME is the device, DEV is the device name the domain will see,
72 # and MODE is r for read-only, w for read-write.
74 #disk = [ 'phy:hda1,hda1,r' ]
75 disk = [ 'file:/var/images/min-el3-i386.img,hda,w', ',hdc:cdrom,r' ]
77 #----------------------------------------------------------------------------
78 # Configure the behaviour when a domain exits. There are three 'reasons'
79 # for a domain to stop: poweroff, reboot, and crash. For each of these you
80 # may specify:
81 #
82 # "destroy", meaning that the domain is cleaned up as normal;
83 # "restart", meaning that a new domain is started in place of the old
84 # one;
85 # "preserve", meaning that no clean-up is done until the domain is
86 # manually destroyed (using xm destroy, for example); or
87 # "rename-restart", meaning that the old domain is not cleaned up, but is
88 # renamed and a new domain started in its place.
89 #
90 # The default is
91 #
92 # on_poweroff = 'destroy'
93 # on_reboot = 'restart'
94 # on_crash = 'restart'
95 #
96 # For backwards compatibility we also support the deprecated option restart
97 #
98 # restart = 'onreboot' means on_poweroff = 'destroy'
99 # on_reboot = 'restart'
100 # on_crash = 'destroy'
101 #
102 # restart = 'always' means on_poweroff = 'restart'
103 # on_reboot = 'restart'
104 # on_crash = 'restart'
105 #
106 # restart = 'never' means on_poweroff = 'destroy'
107 # on_reboot = 'destroy'
108 # on_crash = 'destroy'
110 #on_poweroff = 'destroy'
111 #on_reboot = 'restart'
112 #on_crash = 'restart'
114 #============================================================================
116 # New stuff
117 device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'
119 #-----------------------------------------------------------------------------
120 # boot on floppy (a), hard disk (c), Network (n) or CD-ROM (d)
121 # default: hard disk, cd-rom, floppy
122 #boot="cda"
124 #-----------------------------------------------------------------------------
125 # write to temporary files instead of disk image files
126 #snapshot=1
128 #----------------------------------------------------------------------------
129 # enable SDL library for graphics, default = 0
130 sdl=0
132 #----------------------------------------------------------------------------
133 # enable VNC library for graphics, default = 1
134 vnc=1
136 #----------------------------------------------------------------------------
137 # address that should be listened on for the VNC server if vnc is set.
138 # default is to use 'vnc-listen' setting from /etc/xen/xend-config.sxp
139 #vnclisten="127.0.0.1"
141 #----------------------------------------------------------------------------
142 # set VNC display number, default = domid
143 #vncdisplay=1
145 #----------------------------------------------------------------------------
146 # try to find an unused port for the VNC server, default = 1
147 #vncunused=1
149 #----------------------------------------------------------------------------
150 # enable spawning vncviewer for domain's console
151 # (only valid when vnc=1), default = 0
152 #vncconsole=0
154 #----------------------------------------------------------------------------
155 # set password for domain's VNC console
156 # default is depents on vncpasswd in xend-config.sxp
157 vncpasswd=''
159 #----------------------------------------------------------------------------
160 # no graphics, use serial port
161 #nographic=0
163 #----------------------------------------------------------------------------
164 # enable stdvga, default = 0 (use cirrus logic device model)
165 stdvga=0
167 #-----------------------------------------------------------------------------
168 # serial port re-direct to pty deivce, /dev/pts/n
169 # then xm console or minicom can connect
170 serial='pty'
173 #-----------------------------------------------------------------------------
174 # Qemu Monitor, default is disable
175 # Use ctrl-alt-2 to connect
176 #monitor=1
179 #-----------------------------------------------------------------------------
180 # enable sound card support, [sb16|es1370|all|..,..], default none
181 #soundhw='sb16'
184 #-----------------------------------------------------------------------------
185 # set the real time clock to local time [default=0 i.e. set to utc]
186 #localtime=1
189 #-----------------------------------------------------------------------------
190 # set the real time clock offset in seconds [default=0 i.e. same as dom0]
191 #rtc_timeoffset=3600
193 #-----------------------------------------------------------------------------
194 # start in full screen
195 #full-screen=1
198 #-----------------------------------------------------------------------------
199 # Enable USB support (specific devices specified at runtime through the
200 # monitor window)
201 #usb=1
203 # Enable USB mouse support (only enable one of the following, `mouse' for
204 # PS/2 protocol relative mouse, `tablet' for
205 # absolute mouse)
206 #usbdevice='mouse'
207 #usbdevice='tablet'
209 #-----------------------------------------------------------------------------
210 # Set keyboard layout, default is en-us keyboard.
211 #keymap='ja'