ia64/xen-unstable

changeset 2308:ca553f0e10ea

bitkeeper revision 1.1159.45.4 (41251046RHh_YorMh-pBd-MxpifMww)

rename the example config files.
author iap10@labyrinth.cl.cam.ac.uk
date Thu Aug 19 20:40:38 2004 +0000 (2004-08-19)
parents 0f47aec8946e
children 08bb5efd895d
files .rootkeys tools/examples/Makefile tools/examples/xmdefconfig tools/examples/xmdefconfig-example tools/examples/xmdefconfig-netbsd tools/examples/xmexample1 tools/examples/xmexample2 tools/python/xen/xm/opts.py
line diff
     1.1 --- a/.rootkeys	Thu Aug 19 18:51:53 2004 +0000
     1.2 +++ b/.rootkeys	Thu Aug 19 20:40:38 2004 +0000
     1.3 @@ -268,9 +268,8 @@ 405ff55dawQyCHFEnJ067ChPRoXBBA tools/exa
     1.4  40ee75a9xFz6S05sDKu-JCLqyVTkDA tools/examples/network
     1.5  40ee75a967sxgcRY4Q7zXoVUaJ4flA tools/examples/vif-bridge
     1.6  40ee75a93cqxHp6MiYXxxwR5j2_8QQ tools/examples/xend-config.sxp
     1.7 -41090ec8Pj_bkgCBpg2W7WfmNkumEA tools/examples/xmdefconfig
     1.8 -40cf2937oKlROYOJTN8GWwWM5AmjBg tools/examples/xmdefconfig-example
     1.9 -40dfd40auJwNnb8NoiSnRkvZaaXkUg tools/examples/xmdefconfig-netbsd
    1.10 +41090ec8Pj_bkgCBpg2W7WfmNkumEA tools/examples/xmexample1
    1.11 +40cf2937oKlROYOJTN8GWwWM5AmjBg tools/examples/xmexample2
    1.12  3fbba6dbDfYvJSsw9500b4SZyUhxjQ tools/libxc/Makefile
    1.13  3fbba6dc1uU7U3IFeF6A-XEOYF2MkQ tools/libxc/rpm.spec
    1.14  3fbba6dcrNxtygEcgJYAJJ1gCQqfsA tools/libxc/xc.h
     2.1 --- a/tools/examples/Makefile	Thu Aug 19 18:51:53 2004 +0000
     2.2 +++ b/tools/examples/Makefile	Thu Aug 19 20:40:38 2004 +0000
     2.3 @@ -5,9 +5,8 @@ XEND_INITD = init.d/xend
     2.4  # Xen configuration dir and configs to go there.
     2.5  XEN_CONFIG_DIR = /etc/xen
     2.6  XEN_CONFIGS = xend-config.sxp
     2.7 -XEN_CONFIGS += xmdefconfig 
     2.8 -XEN_CONFIGS += xmdefconfig-example
     2.9 -XEN_CONFIGS += xmdefconfig-netbsd
    2.10 +XEN_CONFIGS += xmexample1 
    2.11 +XEN_CONFIGS += xmexample2
    2.12  
    2.13  # Xen script dir and scripts to go there.
    2.14  XEN_SCRIPT_DIR = /etc/xen/scripts
     3.1 --- a/tools/examples/xmdefconfig	Thu Aug 19 18:51:53 2004 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,85 +0,0 @@
     3.4 -#  -*- mode: python; -*-
     3.5 -#============================================================================
     3.6 -# Python configuration setup for 'xm create'.
     3.7 -# This script sets the parameters used when a domain is created using 'xm create'.
     3.8 -# You use a separate script for each domain you want to create, or 
     3.9 -# you can set the parameters for the domain on the xm command line.
    3.10 -#============================================================================
    3.11 -
    3.12 -#----------------------------------------------------------------------------
    3.13 -# Kernel image file.
    3.14 -kernel = "/boot/vmlinuz-2.4.26-xenU"
    3.15 -
    3.16 -# Optional ramdisk.
    3.17 -#ramdisk = "/boot/initrd.gz"
    3.18 -
    3.19 -# The domain build function. Default is 'linux'.
    3.20 -#builder='linux'
    3.21 -#builder='netbsd'
    3.22 -
    3.23 -# Initial memory allocation (in megabytes) for the new domain.
    3.24 -memory = 64
    3.25 -
    3.26 -# A name for your domain. All domains must have different names.
    3.27 -name = "ExampleDomain"
    3.28 -
    3.29 -# Which CPU to start domain on? 
    3.30 -#cpu = -1   # leave to Xen to pick
    3.31 -
    3.32 -#----------------------------------------------------------------------------
    3.33 -# Define network interfaces.
    3.34 -
    3.35 -# Number of network interfaces. Default is 1.
    3.36 -#nics=1
    3.37 -
    3.38 -# Optionally define mac and/or bridge for the network interfaces.
    3.39 -# Random MACs are assigned if not given.
    3.40 -#vif = [ 'mac=aa:00:00:00:00:11, bridge=xen-br0' ]
    3.41 -
    3.42 -#----------------------------------------------------------------------------
    3.43 -# Define the disk devices you want the domain to have access to, and
    3.44 -# what you want them accessible as.
    3.45 -# Each disk entry is of the form phy:UNAME,DEV,MODE
    3.46 -# where UNAME is the device, DEV is the device name the domain will see,
    3.47 -# and MODE is r for read-only, w for read-write.
    3.48 -
    3.49 -disk = [ 'phy:hda1,xda1,r' ]
    3.50 -
    3.51 -#----------------------------------------------------------------------------
    3.52 -# Set the kernel command line for the new domain.
    3.53 -# You only need to define the IP parameters and hostname if the domain's
    3.54 -# IP config doesn't, e.g. in ifcfg-eth0 or via DHCP.
    3.55 -# You can use 'extra' to set the runlevel and custom environment
    3.56 -# variables used by custom rc scripts (e.g. VMID=, usr= ).
    3.57 -
    3.58 -# Set if you want dhcp to allocate the IP address.
    3.59 -#dhcp="dhcp"
    3.60 -# Set netmask.
    3.61 -#netmask=
    3.62 -# Set default gateway.
    3.63 -#gateway=
    3.64 -# Set the hostname.
    3.65 -#hostname= "vm%d" % vmid
    3.66 -
    3.67 -# Set root device.
    3.68 -root = "/dev/xda1 ro"
    3.69 -
    3.70 -# Root device for nfs.
    3.71 -#root = "/dev/nfs"
    3.72 -# The nfs server.
    3.73 -#nfs_server = '169.254.1.0'  
    3.74 -# Root directory on the nfs server.
    3.75 -#nfs_root   = '/full/path/to/root/directory'
    3.76 -
    3.77 -# Sets runlevel 4.
    3.78 -extra = "4"
    3.79 -
    3.80 -#----------------------------------------------------------------------------
    3.81 -# Set according to whether you want the domain restarted when it exits.
    3.82 -# The default is 'onreboot', which restarts the domain when it shuts down
    3.83 -# with exit code reboot.
    3.84 -# Other values are 'always', and 'never'.
    3.85 -
    3.86 -#restart = 'onreboot'
    3.87 -
    3.88 -#============================================================================
     4.1 --- a/tools/examples/xmdefconfig-example	Thu Aug 19 18:51:53 2004 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,120 +0,0 @@
     4.4 -#  -*- mode: python; -*-
     4.5 -#============================================================================
     4.6 -# Example Python setup script for 'xm create'.
     4.7 -# This script sets the parameters used when a domain is created using 'xm create'.
     4.8 -#
     4.9 -# This is a relatively advanced script that uses a parameter, vmid, to control
    4.10 -# the settings. So this script can be used to start a set of domains by
    4.11 -# setting the vmid parameter on the 'xm create' command line. For example:
    4.12 -#
    4.13 -# xm create vmid=1
    4.14 -# xm create vmid=2
    4.15 -# xm create vmid=3
    4.16 -#
    4.17 -# The vmid is purely a script variable, and has no effect on the the domain
    4.18 -# id assigned to the new domain.
    4.19 -#============================================================================
    4.20 -
    4.21 -# Define script variables here.
    4.22 -# xm_vars is defined automatically, use xm_vars.var() to define a variable.
    4.23 -
    4.24 -# This function checks that 'vmid' has been given a valid value.
    4.25 -# It is called automatically by 'xm create'.
    4.26 -def vmid_check(var, val):
    4.27 -    val = int(val)
    4.28 -    if val <= 0:
    4.29 -        raise ValueError
    4.30 -    return val
    4.31 -
    4.32 -# Define the 'vmid' variable so that 'xm create' knows about it.
    4.33 -xm_vars.var('vmid',
    4.34 -            use="Virtual machine id. Integer greater than 0.",
    4.35 -            check=vmid_check)
    4.36 -
    4.37 -# Check the defined variables have valid values..
    4.38 -xm_vars.check()
    4.39 -
    4.40 -#----------------------------------------------------------------------------
    4.41 -# Kernel image file.
    4.42 -kernel = "/boot/vmlinuz-2.4.26-xenU"
    4.43 -
    4.44 -# Optional ramdisk.
    4.45 -#ramdisk = "/boot/initrd.gz"
    4.46 -
    4.47 -# The domain build function. Default is 'linux'.
    4.48 -#builder='linux'
    4.49 -#builder='netbsd'
    4.50 -
    4.51 -# Initial memory allocation (in megabytes) for the new domain.
    4.52 -memory = 64
    4.53 -
    4.54 -# A name for the new domain. All domains have to have different names,
    4.55 -# so we use the vmid to create a name.
    4.56 -name = "VM%d" % vmid
    4.57 -
    4.58 -# Which CPU to start domain on? 
    4.59 -#cpu = -1   # leave to Xen to pick
    4.60 -cpu = vmid  # set based on vmid (mod number of CPUs)
    4.61 -
    4.62 -#----------------------------------------------------------------------------
    4.63 -# Define network interfaces.
    4.64 -
    4.65 -# Number of network interfaces. Default is 1.
    4.66 -#nics=1
    4.67 -
    4.68 -# Optionally define mac and/or bridge for the network interfaces.
    4.69 -# Random MACs are assigned if not given.
    4.70 -#vif = [ 'mac=aa:00:00:00:00:11, bridge=xen-br0' ]
    4.71 -
    4.72 -#----------------------------------------------------------------------------
    4.73 -# Define the disk devices you want the domain to have access to, and
    4.74 -# what you want them accessible as.
    4.75 -# Each disk entry is of the form phy:UNAME,DEV,MODE
    4.76 -# where UNAME is the device, DEV is the device name the domain will see,
    4.77 -# and MODE is r for read-only, w for read-write.
    4.78 -
    4.79 -# This makes the disk device depend on the vmid - assuming
    4.80 -# that devices sda7, sda8 etc. exist. The device is exported
    4.81 -# to all domains as sda1.
    4.82 -# All domains get sda6 read-only (to use for /usr, see below).
    4.83 -disk = [ 'phy:sda%d,sda1,w' % (7+vmid),
    4.84 -         'phy:sda6,sda6,r' ]
    4.85 -
    4.86 -#----------------------------------------------------------------------------
    4.87 -# Set the kernel command line for the new domain.
    4.88 -# You only need to define the IP parameters and hostname if the domain's
    4.89 -# IP config doesn't, e.g. in ifcfg-eth0 or via DHCP.
    4.90 -# You can use 'extra' to set the runlevel and custom environment
    4.91 -# variables used by custom rc scripts (e.g. VMID=, usr= ).
    4.92 -
    4.93 -# Set if you want dhcp to allocate the IP address.
    4.94 -#dhcp="dhcp"
    4.95 -# Set netmask.
    4.96 -#netmask=
    4.97 -# Set default gateway.
    4.98 -#gateway=
    4.99 -# Set the hostname.
   4.100 -#hostname= "vm%d" % vmid
   4.101 -
   4.102 -# Set root device.
   4.103 -root = "/dev/sda1 ro"
   4.104 -
   4.105 -# Root device for nfs.
   4.106 -#root = "/dev/nfs"
   4.107 -# The nfs server.
   4.108 -#nfs_server = '169.254.1.0'  
   4.109 -# Root directory on the nfs server.
   4.110 -#nfs_root   = '/full/path/to/root/directory'
   4.111 -
   4.112 -# Sets runlevel 4 and the device for /usr.
   4.113 -extra = "4 VMID=%d usr=/dev/sda6" % vmid
   4.114 -
   4.115 -#----------------------------------------------------------------------------
   4.116 -# Set according to whether you want the domain restarted when it exits.
   4.117 -# The default is 'onreboot', which restarts the domain when it shuts down
   4.118 -# with exit code reboot.
   4.119 -# Other values are 'always', and 'never'.
   4.120 -
   4.121 -#restart = 'onreboot'
   4.122 -
   4.123 -#============================================================================
     5.1 --- a/tools/examples/xmdefconfig-netbsd	Thu Aug 19 18:51:53 2004 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,123 +0,0 @@
     5.4 -#  -*- mode: python; -*-
     5.5 -#============================================================================
     5.6 -# Example Python setup script for 'xm create'.
     5.7 -# This script sets the parameters used when a domain is created using 'xm create'.
     5.8 -#
     5.9 -# This is a relatively advanced script that uses a parameter, vmid, to control
    5.10 -# the settings. So this script can be used to start a set of domains by
    5.11 -# setting the vmid parameter on the 'xm create' command line. For example:
    5.12 -#
    5.13 -# xm create vmid=1
    5.14 -# xm create vmid=2
    5.15 -# xm create vmid=3
    5.16 -#
    5.17 -# The vmid is purely a script variable, and has no effect on the the domain
    5.18 -# id assigned to the new domain.
    5.19 -#============================================================================
    5.20 -
    5.21 -# Define script variables here.
    5.22 -# xm_vars is defined automatically, use xm_vars.var() to define a variable.
    5.23 -
    5.24 -# This function checks that 'vmid' has been given a valid value.
    5.25 -# It is called automatically by 'xm create'.
    5.26 -def vmid_check(var, val):
    5.27 -    val = int(val)
    5.28 -    if val <= 0:
    5.29 -        raise ValueError
    5.30 -    return val
    5.31 -
    5.32 -# Define the 'vmid' variable so that 'xm create' knows about it.
    5.33 -xm_vars.var('vmid',
    5.34 -            use="Virtual machine id. Integer greater than 0.",
    5.35 -            check=vmid_check)
    5.36 -
    5.37 -# Check the defined variables have valid values..
    5.38 -xm_vars.check()
    5.39 -
    5.40 -#----------------------------------------------------------------------------
    5.41 -# Kernel image file.
    5.42 -image = "/boot/netbsd"
    5.43 -
    5.44 -# The domain build function.
    5.45 -builder='netbsd'
    5.46 -
    5.47 -# Initial memory allocation (in megabytes) for the new domain.
    5.48 -memory = 16
    5.49 -
    5.50 -# A name for the new domain. All domains have to have different names,
    5.51 -# so we use the vmid to create a name.
    5.52 -name = "NETBSD%d" % vmid
    5.53 -
    5.54 -#----------------------------------------------------------------------------
    5.55 -# Define network interfaces.
    5.56 -
    5.57 -# Number of network interfaces. Default is 1.
    5.58 -#nics=1
    5.59 -
    5.60 -# Optionally define mac and/or bridge for the network interfaces.
    5.61 -# Random MACs are assigned if not given.
    5.62 -#vif = [ 'mac=aa:00:00:00:00:11, bridge=xen-br0' ]
    5.63 -
    5.64 -# Specify IP address(es), for the new domain.  You need to
    5.65 -# configure IP addrs within the domain just as you do normally.  This
    5.66 -# is just to let Xen know about them so it can route packets
    5.67 -# appropriately.
    5.68 -
    5.69 -#ipaddr = [ xenctl.utils.add_offset_to_ip(xenctl.utils.get_current_ipaddr(),vmid),
    5.70 -#           xenctl.utils.add_offset_to_ip('169.254.1.0',vmid),
    5.71 -#           ]
    5.72 -
    5.73 -#----------------------------------------------------------------------------
    5.74 -# Define the disk devices you want the domain to have access to, and
    5.75 -# what you want them accessible as.
    5.76 -# Each disk entry is of the form phy:UNAME,DEV,MODE
    5.77 -# where UNAME is the device, DEV is the device name the domain will see,
    5.78 -# and MODE is r for read-only, w for read-write.
    5.79 -
    5.80 -# This makes the disk device depend on the vmid - assuming
    5.81 -# that devices sda7, sda8 etc. exist. The device is exported
    5.82 -# to all domains as sda1.
    5.83 -# All domains get sda6 read-only (to use for /usr, see below).
    5.84 -disk = [ 'phy:sda%d,sda1,w' % (7+vmid),
    5.85 -         'phy:sda6,sda6,r' ]
    5.86 -
    5.87 -#----------------------------------------------------------------------------
    5.88 -# Set the kernel command line for the new domain.
    5.89 -# You only need to define the IP parameters and hostname if the domain's
    5.90 -# IP config doesn't, e.g. in ifcfg-eth0 or via DHCP.
    5.91 -# You can use 'extra' to set the runlevel and custom environment
    5.92 -# variables used by custom rc scripts (e.g. VMID=, usr= ).
    5.93 -
    5.94 -# Set if you want dhcp to allocate the IP address.
    5.95 -#dhcp="dhcp"
    5.96 -# Set netmask.
    5.97 -#netmask=
    5.98 -# Set default gateway.
    5.99 -#gateway=
   5.100 -# Set the hostname.
   5.101 -#hostname= "vm%d" % vmid
   5.102 -
   5.103 -# Set root device.
   5.104 -root = "/dev/sda1 ro"
   5.105 -
   5.106 -# Root device for nfs.
   5.107 -#root = "/dev/nfs"
   5.108 -# The nfs server.
   5.109 -#nfs_server = '169.254.1.0'  
   5.110 -# Root directory on the nfs server.
   5.111 -#nfs_root   = '/full/path/to/root/directory'
   5.112 -
   5.113 -# Sets runlevel 4 and the device for /usr.
   5.114 -#extra = "4 VMID=%d usr=/dev/sda6" % vmid
   5.115 -extra = "4 VMID=%d bootdev=xennet0" % vmid
   5.116 -
   5.117 -
   5.118 -#----------------------------------------------------------------------------
   5.119 -# Set according to whether you want the domain restarted when it exits.
   5.120 -# The default is 'onreboot', which restarts the domain when it shuts down
   5.121 -# with exit code reboot.
   5.122 -# Other values are 'always', and 'never'.
   5.123 -#
   5.124 -#restart = 'onreboot'
   5.125 -
   5.126 -#============================================================================
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/tools/examples/xmexample1	Thu Aug 19 20:40:38 2004 +0000
     6.3 @@ -0,0 +1,85 @@
     6.4 +#  -*- mode: python; -*-
     6.5 +#============================================================================
     6.6 +# Python configuration setup for 'xm create'.
     6.7 +# This script sets the parameters used when a domain is created using 'xm create'.
     6.8 +# You use a separate script for each domain you want to create, or 
     6.9 +# you can set the parameters for the domain on the xm command line.
    6.10 +#============================================================================
    6.11 +
    6.12 +#----------------------------------------------------------------------------
    6.13 +# Kernel image file.
    6.14 +kernel = "/boot/vmlinuz-2.4.26-xenU"
    6.15 +
    6.16 +# Optional ramdisk.
    6.17 +#ramdisk = "/boot/initrd.gz"
    6.18 +
    6.19 +# The domain build function. Default is 'linux'.
    6.20 +#builder='linux'
    6.21 +#builder='netbsd'
    6.22 +
    6.23 +# Initial memory allocation (in megabytes) for the new domain.
    6.24 +memory = 64
    6.25 +
    6.26 +# A name for your domain. All domains must have different names.
    6.27 +name = "ExampleDomain"
    6.28 +
    6.29 +# Which CPU to start domain on? 
    6.30 +#cpu = -1   # leave to Xen to pick
    6.31 +
    6.32 +#----------------------------------------------------------------------------
    6.33 +# Define network interfaces.
    6.34 +
    6.35 +# Number of network interfaces. Default is 1.
    6.36 +#nics=1
    6.37 +
    6.38 +# Optionally define mac and/or bridge for the network interfaces.
    6.39 +# Random MACs are assigned if not given.
    6.40 +#vif = [ 'mac=aa:00:00:00:00:11, bridge=xen-br0' ]
    6.41 +
    6.42 +#----------------------------------------------------------------------------
    6.43 +# Define the disk devices you want the domain to have access to, and
    6.44 +# what you want them accessible as.
    6.45 +# Each disk entry is of the form phy:UNAME,DEV,MODE
    6.46 +# where UNAME is the device, DEV is the device name the domain will see,
    6.47 +# and MODE is r for read-only, w for read-write.
    6.48 +
    6.49 +disk = [ 'phy:hda1,xda1,r' ]
    6.50 +
    6.51 +#----------------------------------------------------------------------------
    6.52 +# Set the kernel command line for the new domain.
    6.53 +# You only need to define the IP parameters and hostname if the domain's
    6.54 +# IP config doesn't, e.g. in ifcfg-eth0 or via DHCP.
    6.55 +# You can use 'extra' to set the runlevel and custom environment
    6.56 +# variables used by custom rc scripts (e.g. VMID=, usr= ).
    6.57 +
    6.58 +# Set if you want dhcp to allocate the IP address.
    6.59 +#dhcp="dhcp"
    6.60 +# Set netmask.
    6.61 +#netmask=
    6.62 +# Set default gateway.
    6.63 +#gateway=
    6.64 +# Set the hostname.
    6.65 +#hostname= "vm%d" % vmid
    6.66 +
    6.67 +# Set root device.
    6.68 +root = "/dev/xda1 ro"
    6.69 +
    6.70 +# Root device for nfs.
    6.71 +#root = "/dev/nfs"
    6.72 +# The nfs server.
    6.73 +#nfs_server = '169.254.1.0'  
    6.74 +# Root directory on the nfs server.
    6.75 +#nfs_root   = '/full/path/to/root/directory'
    6.76 +
    6.77 +# Sets runlevel 4.
    6.78 +extra = "4"
    6.79 +
    6.80 +#----------------------------------------------------------------------------
    6.81 +# Set according to whether you want the domain restarted when it exits.
    6.82 +# The default is 'onreboot', which restarts the domain when it shuts down
    6.83 +# with exit code reboot.
    6.84 +# Other values are 'always', and 'never'.
    6.85 +
    6.86 +#restart = 'onreboot'
    6.87 +
    6.88 +#============================================================================
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/tools/examples/xmexample2	Thu Aug 19 20:40:38 2004 +0000
     7.3 @@ -0,0 +1,120 @@
     7.4 +#  -*- mode: python; -*-
     7.5 +#============================================================================
     7.6 +# Example Python setup script for 'xm create'.
     7.7 +# This script sets the parameters used when a domain is created using 'xm create'.
     7.8 +#
     7.9 +# This is a relatively advanced script that uses a parameter, vmid, to control
    7.10 +# the settings. So this script can be used to start a set of domains by
    7.11 +# setting the vmid parameter on the 'xm create' command line. For example:
    7.12 +#
    7.13 +# xm create vmid=1
    7.14 +# xm create vmid=2
    7.15 +# xm create vmid=3
    7.16 +#
    7.17 +# The vmid is purely a script variable, and has no effect on the the domain
    7.18 +# id assigned to the new domain.
    7.19 +#============================================================================
    7.20 +
    7.21 +# Define script variables here.
    7.22 +# xm_vars is defined automatically, use xm_vars.var() to define a variable.
    7.23 +
    7.24 +# This function checks that 'vmid' has been given a valid value.
    7.25 +# It is called automatically by 'xm create'.
    7.26 +def vmid_check(var, val):
    7.27 +    val = int(val)
    7.28 +    if val <= 0:
    7.29 +        raise ValueError
    7.30 +    return val
    7.31 +
    7.32 +# Define the 'vmid' variable so that 'xm create' knows about it.
    7.33 +xm_vars.var('vmid',
    7.34 +            use="Virtual machine id. Integer greater than 0.",
    7.35 +            check=vmid_check)
    7.36 +
    7.37 +# Check the defined variables have valid values..
    7.38 +xm_vars.check()
    7.39 +
    7.40 +#----------------------------------------------------------------------------
    7.41 +# Kernel image file.
    7.42 +kernel = "/boot/vmlinuz-2.4.26-xenU"
    7.43 +
    7.44 +# Optional ramdisk.
    7.45 +#ramdisk = "/boot/initrd.gz"
    7.46 +
    7.47 +# The domain build function. Default is 'linux'.
    7.48 +#builder='linux'
    7.49 +#builder='netbsd'
    7.50 +
    7.51 +# Initial memory allocation (in megabytes) for the new domain.
    7.52 +memory = 64
    7.53 +
    7.54 +# A name for the new domain. All domains have to have different names,
    7.55 +# so we use the vmid to create a name.
    7.56 +name = "VM%d" % vmid
    7.57 +
    7.58 +# Which CPU to start domain on? 
    7.59 +#cpu = -1   # leave to Xen to pick
    7.60 +cpu = vmid  # set based on vmid (mod number of CPUs)
    7.61 +
    7.62 +#----------------------------------------------------------------------------
    7.63 +# Define network interfaces.
    7.64 +
    7.65 +# Number of network interfaces. Default is 1.
    7.66 +#nics=1
    7.67 +
    7.68 +# Optionally define mac and/or bridge for the network interfaces.
    7.69 +# Random MACs are assigned if not given.
    7.70 +#vif = [ 'mac=aa:00:00:00:00:11, bridge=xen-br0' ]
    7.71 +
    7.72 +#----------------------------------------------------------------------------
    7.73 +# Define the disk devices you want the domain to have access to, and
    7.74 +# what you want them accessible as.
    7.75 +# Each disk entry is of the form phy:UNAME,DEV,MODE
    7.76 +# where UNAME is the device, DEV is the device name the domain will see,
    7.77 +# and MODE is r for read-only, w for read-write.
    7.78 +
    7.79 +# This makes the disk device depend on the vmid - assuming
    7.80 +# that devices sda7, sda8 etc. exist. The device is exported
    7.81 +# to all domains as sda1.
    7.82 +# All domains get sda6 read-only (to use for /usr, see below).
    7.83 +disk = [ 'phy:sda%d,sda1,w' % (7+vmid),
    7.84 +         'phy:sda6,sda6,r' ]
    7.85 +
    7.86 +#----------------------------------------------------------------------------
    7.87 +# Set the kernel command line for the new domain.
    7.88 +# You only need to define the IP parameters and hostname if the domain's
    7.89 +# IP config doesn't, e.g. in ifcfg-eth0 or via DHCP.
    7.90 +# You can use 'extra' to set the runlevel and custom environment
    7.91 +# variables used by custom rc scripts (e.g. VMID=, usr= ).
    7.92 +
    7.93 +# Set if you want dhcp to allocate the IP address.
    7.94 +#dhcp="dhcp"
    7.95 +# Set netmask.
    7.96 +#netmask=
    7.97 +# Set default gateway.
    7.98 +#gateway=
    7.99 +# Set the hostname.
   7.100 +#hostname= "vm%d" % vmid
   7.101 +
   7.102 +# Set root device.
   7.103 +root = "/dev/sda1 ro"
   7.104 +
   7.105 +# Root device for nfs.
   7.106 +#root = "/dev/nfs"
   7.107 +# The nfs server.
   7.108 +#nfs_server = '169.254.1.0'  
   7.109 +# Root directory on the nfs server.
   7.110 +#nfs_root   = '/full/path/to/root/directory'
   7.111 +
   7.112 +# Sets runlevel 4 and the device for /usr.
   7.113 +extra = "4 VMID=%d usr=/dev/sda6" % vmid
   7.114 +
   7.115 +#----------------------------------------------------------------------------
   7.116 +# Set according to whether you want the domain restarted when it exits.
   7.117 +# The default is 'onreboot', which restarts the domain when it shuts down
   7.118 +# with exit code reboot.
   7.119 +# Other values are 'always', and 'never'.
   7.120 +
   7.121 +#restart = 'onreboot'
   7.122 +
   7.123 +#============================================================================
     8.1 --- a/tools/python/xen/xm/opts.py	Thu Aug 19 18:51:53 2004 +0000
     8.2 +++ b/tools/python/xen/xm/opts.py	Thu Aug 19 20:40:38 2004 +0000
     8.3 @@ -347,7 +347,7 @@ class Opts:
     8.4  
     8.5      def var_usage(self):
     8.6          if self.vars:
     8.7 -            print 'The defconfig defines the following variables:'
     8.8 +            print 'The config file defines the following variables:'
     8.9              for var in self.vars:
    8.10                  var.show()
    8.11                  print
    8.12 @@ -372,11 +372,11 @@ class Opts:
    8.13              else:
    8.14                  p = self.vals.defconfig
    8.15              if os.path.exists(p):
    8.16 -                self.info('Using defconfig file %s.' % p)
    8.17 +                self.info('Using config file "%s".' % p)
    8.18                  self.load(p, help)
    8.19                  break
    8.20          else:
    8.21 -            self.err("Cannot open defconfig file %s" % self.vals.defconfig)
    8.22 +            self.err('Cannot open config file "%s"' % self.vals.defconfig)
    8.23  
    8.24      def load(self, defconfig, help):
    8.25          """Load a defconfig file. Local variables in the file