ia64/xen-unstable

changeset 18256:128af2e5bde2

PV-GRUB: add sample config file

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Aug 04 18:10:51 2008 +0100 (2008-08-04)
parents f7d8ddf4dddd
children 477b6a32da4f
files tools/examples/xmexample.pv-grub
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tools/examples/xmexample.pv-grub	Mon Aug 04 18:10:51 2008 +0100
     1.3 @@ -0,0 +1,212 @@
     1.4 +#  -*- mode: python; -*-
     1.5 +#============================================================================
     1.6 +# Python configuration setup for 'xm create'.
     1.7 +# This script sets the parameters used when a domain is created using 'xm create'.
     1.8 +# You use a separate script for each domain you want to create, or 
     1.9 +# you can set the parameters for the domain on the xm command line.
    1.10 +#============================================================================
    1.11 +
    1.12 +#----------------------------------------------------------------------------
    1.13 +# PV GRUB image file.
    1.14 +kernel = "/usr/lib/xen/boot/pv-grub.gz"
    1.15 +
    1.16 +# Optional provided menu.lst.
    1.17 +#ramdisk = "/boot/guests/menu.lst"
    1.18 +
    1.19 +# Sets path to menu.lst
    1.20 +extra = "(hd0,0)/boot/grub/menu.lst"
    1.21 +# can be a TFTP-served path (DHCP will automatically be run)
    1.22 +# extra = "(nd)/netboot/menu.lst"
    1.23 +# can be configured automatically by GRUB's DHCP option 150 (see grub manual)
    1.24 +# extra = ""
    1.25 +
    1.26 +# Initial memory allocation (in megabytes) for the new domain.
    1.27 +#
    1.28 +# WARNING: Creating a domain with insufficient memory may cause out of
    1.29 +#          memory errors. The domain needs enough memory to boot kernel
    1.30 +#          and modules. Allocating less than 32MBs is not recommended.
    1.31 +memory = 64
    1.32 +
    1.33 +# A name for your domain. All domains must have different names.
    1.34 +name = "ExampleDomain"
    1.35 +
    1.36 +# 128-bit UUID for the domain.  The default behavior is to generate a new UUID
    1.37 +# on each call to 'xm create'.
    1.38 +#uuid = "06ed00fe-1162-4fc4-b5d8-11993ee4a8b9"
    1.39 +
    1.40 +# List of which CPUS this domain is allowed to use, default Xen picks
    1.41 +#cpus = ""         # leave to Xen to pick
    1.42 +#cpus = "0"        # all vcpus run on CPU0
    1.43 +#cpus = "0-3,5,^1" # all vcpus run on cpus 0,2,3,5
    1.44 +#cpus = ["2", "3"] # VCPU0 runs on CPU2, VCPU1 runs on CPU3
    1.45 +
    1.46 +# Number of Virtual CPUS to use, default is 1
    1.47 +#vcpus = 1
    1.48 +
    1.49 +#----------------------------------------------------------------------------
    1.50 +# Define network interfaces.
    1.51 +
    1.52 +# By default, no network interfaces are configured.  You may have one created
    1.53 +# with sensible defaults using an empty vif clause:
    1.54 +#
    1.55 +# vif = [ '' ]
    1.56 +#
    1.57 +# or optionally override backend, bridge, ip, mac, script, type, or vifname:
    1.58 +#
    1.59 +# vif = [ 'mac=00:16:3e:00:00:11, bridge=xenbr0' ]
    1.60 +#
    1.61 +# or more than one interface may be configured:
    1.62 +#
    1.63 +# vif = [ '', 'bridge=xenbr1' ]
    1.64 +
    1.65 +vif = [ '' ]
    1.66 +
    1.67 +#----------------------------------------------------------------------------
    1.68 +# Define the disk devices you want the domain to have access to, and
    1.69 +# what you want them accessible as.
    1.70 +# Each disk entry is of the form phy:UNAME,DEV,MODE
    1.71 +# where UNAME is the device, DEV is the device name the domain will see,
    1.72 +# and MODE is r for read-only, w for read-write.
    1.73 +
    1.74 +disk = [ 'phy:hda1,hda1,w' ]
    1.75 +
    1.76 +#----------------------------------------------------------------------------
    1.77 +# Define frame buffer device.
    1.78 +#
    1.79 +# By default, no frame buffer device is configured.
    1.80 +#
    1.81 +# To create one using the SDL backend and sensible defaults:
    1.82 +#
    1.83 +# vfb = [ 'type=sdl' ]
    1.84 +#
    1.85 +# This uses environment variables XAUTHORITY and DISPLAY.  You
    1.86 +# can override that:
    1.87 +#
    1.88 +# vfb = [ 'type=sdl,xauthority=/home/bozo/.Xauthority,display=:1' ]
    1.89 +#
    1.90 +# To create one using the VNC backend and sensible defaults:
    1.91 +#
    1.92 +# vfb = [ 'type=vnc' ]
    1.93 +#
    1.94 +# The backend listens on 127.0.0.1 port 5900+N by default, where N is
    1.95 +# the domain ID.  You can override both address and N:
    1.96 +#
    1.97 +# vfb = [ 'type=vnc,vnclisten=127.0.0.1,vncdisplay=1' ]
    1.98 +#
    1.99 +# Or you can bind the first unused port above 5900:
   1.100 +#
   1.101 +# vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncunused=1' ]
   1.102 +#
   1.103 +# You can override the password:
   1.104 +#
   1.105 +# vfb = [ 'type=vnc,vncpasswd=MYPASSWD' ]
   1.106 +#
   1.107 +# Empty password disables authentication.  Defaults to the vncpasswd
   1.108 +# configured in xend-config.sxp.
   1.109 +
   1.110 +#----------------------------------------------------------------------------
   1.111 +# Define to which TPM instance the user domain should communicate.
   1.112 +# The vtpm entry is of the form 'instance=INSTANCE,backend=DOM'
   1.113 +# where INSTANCE indicates the instance number of the TPM the VM
   1.114 +# should be talking to and DOM provides the domain where the backend
   1.115 +# is located.
   1.116 +# Note that no two virtual machines should try to connect to the same
   1.117 +# TPM instance. The handling of all TPM instances does require
   1.118 +# some management effort in so far that VM configration files (and thus
   1.119 +# a VM) should be associated with a TPM instance throughout the lifetime
   1.120 +# of the VM / VM configuration file. The instance number must be
   1.121 +# greater or equal to 1.
   1.122 +#vtpm = [ 'instance=1,backend=0' ]
   1.123 +
   1.124 +#----------------------------------------------------------------------------
   1.125 +# Set the kernel command line for the new domain.
   1.126 +# You only need to define the IP parameters and hostname if the domain's
   1.127 +# IP config doesn't, e.g. in ifcfg-eth0 or via DHCP.
   1.128 +# You can use 'extra' to set the runlevel and custom environment
   1.129 +# variables used by custom rc scripts (e.g. VMID=, usr= ).
   1.130 +
   1.131 +# Set if you want dhcp to allocate the IP address.
   1.132 +#dhcp="dhcp"
   1.133 +# Set netmask.
   1.134 +#netmask=
   1.135 +# Set default gateway.
   1.136 +#gateway=
   1.137 +# Set the hostname.
   1.138 +#hostname= "vm%d" % vmid
   1.139 +
   1.140 +# Set root device.
   1.141 +root = "/dev/hda1 ro"
   1.142 +
   1.143 +# Root device for nfs.
   1.144 +#root = "/dev/nfs"
   1.145 +# The nfs server.
   1.146 +#nfs_server = '192.0.2.1'  
   1.147 +# Root directory on the nfs server.
   1.148 +#nfs_root   = '/full/path/to/root/directory'
   1.149 +
   1.150 +#----------------------------------------------------------------------------
   1.151 +# Configure the behaviour when a domain exits.  There are three 'reasons'
   1.152 +# for a domain to stop: poweroff, reboot, and crash.  For each of these you
   1.153 +# may specify:
   1.154 +#
   1.155 +#   "destroy",        meaning that the domain is cleaned up as normal;
   1.156 +#   "restart",        meaning that a new domain is started in place of the old
   1.157 +#                     one;
   1.158 +#   "preserve",       meaning that no clean-up is done until the domain is
   1.159 +#                     manually destroyed (using xm destroy, for example); or
   1.160 +#   "rename-restart", meaning that the old domain is not cleaned up, but is
   1.161 +#                     renamed and a new domain started in its place.
   1.162 +#
   1.163 +# In the event a domain stops due to a crash, you have the additional options:
   1.164 +#
   1.165 +#   "coredump-destroy", meaning dump the crashed domain's core and then destroy;
   1.166 +#   "coredump-restart', meaning dump the crashed domain's core and the restart.
   1.167 +#
   1.168 +# The default is
   1.169 +#
   1.170 +#   on_poweroff = 'destroy'
   1.171 +#   on_reboot   = 'restart'
   1.172 +#   on_crash    = 'restart'
   1.173 +#
   1.174 +# For backwards compatibility we also support the deprecated option restart
   1.175 +#
   1.176 +# restart = 'onreboot' means on_poweroff = 'destroy'
   1.177 +#                            on_reboot   = 'restart'
   1.178 +#                            on_crash    = 'destroy'
   1.179 +#
   1.180 +# restart = 'always'   means on_poweroff = 'restart'
   1.181 +#                            on_reboot   = 'restart'
   1.182 +#                            on_crash    = 'restart'
   1.183 +#
   1.184 +# restart = 'never'    means on_poweroff = 'destroy'
   1.185 +#                            on_reboot   = 'destroy'
   1.186 +#                            on_crash    = 'destroy'
   1.187 +
   1.188 +#on_poweroff = 'destroy'
   1.189 +#on_reboot   = 'restart'
   1.190 +#on_crash    = 'restart'
   1.191 +
   1.192 +#-----------------------------------------------------------------------------
   1.193 +#   Configure PVSCSI devices:
   1.194 +#
   1.195 +#vscsi=[ 'PDEV, VDEV' ]
   1.196 +#
   1.197 +#   PDEV   gives physical SCSI device to be attached to specified guest
   1.198 +#          domain by one of the following identifier format.
   1.199 +#          - XX:XX:XX:XX (4-tuples with decimal notation which shows
   1.200 +#                          "host:channel:target:lun")
   1.201 +#          - /dev/sdxx or sdx
   1.202 +#          - /dev/stxx or stx
   1.203 +#          - /dev/sgxx or sgx
   1.204 +#          - result of 'scsi_id -gu -s'.
   1.205 +#            ex. # scsi_id -gu -s /block/sdb
   1.206 +#                  36000b5d0006a0000006a0257004c0000
   1.207 +#
   1.208 +#   VDEV   gives virtual SCSI device by 4-tuples (XX:XX:XX:XX) as 
   1.209 +#          which the specified guest domain recognize.
   1.210 +#
   1.211 +
   1.212 +#vscsi = [ '/dev/sdx, 0:0:0:0' ]
   1.213 +
   1.214 +#============================================================================
   1.215 +