source: trunk/packages/xen-3.1/xen-3.1/tools/examples/xmexample1 @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 6.3 KB
Line 
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#============================================================================
8
9#----------------------------------------------------------------------------
10# Kernel image file.
11kernel = "/boot/vmlinuz-2.6.10-xenU"
12
13# Optional ramdisk.
14#ramdisk = "/boot/initrd.gz"
15
16# The domain build function. Default is 'linux'.
17#builder='linux'
18
19# Initial memory allocation (in megabytes) for the new domain.
20#
21# WARNING: Creating a domain with insufficient memory may cause out of
22#          memory errors. The domain needs enough memory to boot kernel
23#          and modules. Allocating less than 32MBs is not recommended.
24memory = 64
25
26# A name for your domain. All domains must have different names.
27name = "ExampleDomain"
28
29# 128-bit UUID for the domain.  The default behavior is to generate a new UUID
30# on each call to 'xm create'.
31#uuid = "06ed00fe-1162-4fc4-b5d8-11993ee4a8b9"
32
33# List of which CPUS this domain is allowed to use, default Xen picks
34#cpus = ""         # leave to Xen to pick
35#cpus = "0"        # all vcpus run on CPU0
36#cpus = "0-3,5,^1" # run on cpus 0,2,3,5
37
38# Number of Virtual CPUS to use, default is 1
39#vcpus = 1
40
41#----------------------------------------------------------------------------
42# Define network interfaces.
43
44# By default, no network interfaces are configured.  You may have one created
45# with sensible defaults using an empty vif clause:
46#
47# vif = [ '' ]
48#
49# or optionally override backend, bridge, ip, mac, script, type, or vifname:
50#
51# vif = [ 'mac=00:16:3e:00:00:11, bridge=xenbr0' ]
52#
53# or more than one interface may be configured:
54#
55# vif = [ '', 'bridge=xenbr1' ]
56
57vif = [ '' ]
58
59#----------------------------------------------------------------------------
60# Define the disk devices you want the domain to have access to, and
61# what you want them accessible as.
62# Each disk entry is of the form phy:UNAME,DEV,MODE
63# where UNAME is the device, DEV is the device name the domain will see,
64# and MODE is r for read-only, w for read-write.
65
66disk = [ 'phy:hda1,hda1,w' ]
67
68#----------------------------------------------------------------------------
69# Define frame buffer device.
70#
71# By default, no frame buffer device is configured.
72#
73# To create one using the SDL backend and sensible defaults:
74#
75# vfb = [ 'type=sdl' ]
76#
77# This uses environment variables XAUTHORITY and DISPLAY.  You
78# can override that:
79#
80# vfb = [ 'type=sdl,xauthority=/home/bozo/.Xauthority,display=:1' ]
81#
82# To create one using the VNC backend and sensible defaults:
83#
84# vfb = [ 'type=vnc' ]
85#
86# The backend listens on 127.0.0.1 port 5900+N by default, where N is
87# the domain ID.  You can override both address and N:
88#
89# vfb = [ 'type=vnc,vnclisten=127.0.0.1,vncdisplay=1' ]
90#
91# Or you can bind the first unused port above 5900:
92#
93# vfb = [ 'type=vnc,vnclisten=0.0.0.0,vnunused=1' ]
94#
95# You can override the password:
96#
97# vfb = [ 'type=vnc,vncpasswd=MYPASSWD' ]
98#
99# Empty password disables authentication.  Defaults to the vncpasswd
100# configured in xend-config.sxp.
101
102#----------------------------------------------------------------------------
103# Define to which TPM instance the user domain should communicate.
104# The vtpm entry is of the form 'instance=INSTANCE,backend=DOM'
105# where INSTANCE indicates the instance number of the TPM the VM
106# should be talking to and DOM provides the domain where the backend
107# is located.
108# Note that no two virtual machines should try to connect to the same
109# TPM instance. The handling of all TPM instances does require
110# some management effort in so far that VM configration files (and thus
111# a VM) should be associated with a TPM instance throughout the lifetime
112# of the VM / VM configuration file. The instance number must be
113# greater or equal to 1.
114#vtpm = [ 'instance=1,backend=0' ]
115
116#----------------------------------------------------------------------------
117# Set the kernel command line for the new domain.
118# You only need to define the IP parameters and hostname if the domain's
119# IP config doesn't, e.g. in ifcfg-eth0 or via DHCP.
120# You can use 'extra' to set the runlevel and custom environment
121# variables used by custom rc scripts (e.g. VMID=, usr= ).
122
123# Set if you want dhcp to allocate the IP address.
124#dhcp="dhcp"
125# Set netmask.
126#netmask=
127# Set default gateway.
128#gateway=
129# Set the hostname.
130#hostname= "vm%d" % vmid
131
132# Set root device.
133root = "/dev/hda1 ro"
134
135# Root device for nfs.
136#root = "/dev/nfs"
137# The nfs server.
138#nfs_server = '169.254.1.0' 
139# Root directory on the nfs server.
140#nfs_root   = '/full/path/to/root/directory'
141
142# Sets runlevel 4.
143extra = "4"
144
145#----------------------------------------------------------------------------
146# Configure the behaviour when a domain exits.  There are three 'reasons'
147# for a domain to stop: poweroff, reboot, and crash.  For each of these you
148# may specify:
149#
150#   "destroy",        meaning that the domain is cleaned up as normal;
151#   "restart",        meaning that a new domain is started in place of the old
152#                     one;
153#   "preserve",       meaning that no clean-up is done until the domain is
154#                     manually destroyed (using xm destroy, for example); or
155#   "rename-restart", meaning that the old domain is not cleaned up, but is
156#                     renamed and a new domain started in its place.
157#
158# The default is
159#
160#   on_poweroff = 'destroy'
161#   on_reboot   = 'restart'
162#   on_crash    = 'restart'
163#
164# For backwards compatibility we also support the deprecated option restart
165#
166# restart = 'onreboot' means on_poweroff = 'destroy'
167#                            on_reboot   = 'restart'
168#                            on_crash    = 'destroy'
169#
170# restart = 'always'   means on_poweroff = 'restart'
171#                            on_reboot   = 'restart'
172#                            on_crash    = 'restart'
173#
174# restart = 'never'    means on_poweroff = 'destroy'
175#                            on_reboot   = 'destroy'
176#                            on_crash    = 'destroy'
177
178#on_poweroff = 'destroy'
179#on_reboot   = 'restart'
180#on_crash    = 'restart'
181
182#============================================================================
Note: See TracBrowser for help on using the repository browser.