ia64/xen-unstable

view tools/examples/xmdefaults @ 1620:716d743558b3

bitkeeper revision 1.1026.1.6 (40e180810BOOM8ptYv7X58EAvGDs4w)

Change default to xenU kernel.
author mjw@wray-m-3.hpl.hp.com
date Tue Jun 29 14:45:21 2004 +0000 (2004-06-29)
parents cdccf1a15b0f
children 236a9f2698a3
line source
1 # -*- mode: python; -*-
2 #============================================================================
3 # Python defaults setup for 'xm create'.
4 # Edit this file to reflect the configuration of your system.
5 # This file expects the variable 'vmid' to be set.
6 #============================================================================
8 try:
9 vmid = int(vmid) # convert to integer
10 except:
11 raise ValueError, "Variable 'vmid' must be an integer"
13 if vmid <= 0:
14 raise ValueError, "Variable 'vmid' must be greater than 0"
17 #----------------------------------------------------------------------------
18 # Kernel image file.
19 kernel = "../../../install/boot/vmlinuz-2.4.26-xenU"
21 # Optional ramdisk.
22 #ramdisk = "/boot/initrd.gz"
24 # The domain build function. Default is 'linux'.
25 #builder='linux'
26 #builder='netbsd'
28 # Initial memory allocation (in megabytes) for the new domain.
29 memory = 64
31 # A handy name for your new domain.
32 name = "This is VM %d" % vmid
34 # Which CPU to start domain on?
35 #cpu = -1 # leave to Xen to pick
36 cpu = vmid # set based on vmid (mod number of CPUs)
38 #----------------------------------------------------------------------------
39 # Define network interfaces.
41 # Number of network interfaces. Default is 1.
42 #nics=1
44 # Optionally define mac and/or bridge for the network interfaces.
45 # Random MACs are assigned if not given.
46 #vif = [ 'mac=aa:00:00:00:00:11, bridge=nbe-br' ]
48 #----------------------------------------------------------------------------
49 # Define the disk devices you want the domain to have access to, and
50 # what you want them accessible as.
51 # Each disk entry is of the form phy:DEV,VDEV,MODE
52 # where DEV is the device, VDEV is the device name the domain will see,
53 # and MODE is r for read-only, w for read-write.
55 disk = [ 'phy:sda%d,sda1,w' % (7+vmid),
56 'phy:sda6,sda6,r' ]
58 #----------------------------------------------------------------------------
59 # Set the kernel command line for the new domain.
60 # You only need to define the IP parameters and hostname if the domain's
61 # IP config doesn't, e.g. in ifcfg-eth0 or via DHCP.
62 # You can use 'extra' to set the runlevel and custom environment
63 # variables used by custom rc scripts (e.g. VMID=, usr= ).
65 # Set if you want dhcp to allocate the IP address.
66 #dhcp="dhcp"
67 # Set netmask.
68 #netmask=
69 # Set default gateway.
70 #gateway=
71 # Set the hostname.
72 #hostname= "vm%d" % vmid
74 # Set root device.
75 root = "/dev/sda1 ro"
77 # Root device for nfs.
78 #root = "/dev/nfs"
79 # The nfs server.
80 #nfs_server = '169.254.1.0'
81 # Root directory on the nfs server.
82 #nfs_root = '/full/path/to/root/directory'
84 # Sets runlevel 4 and the device for /usr.
85 extra = "4 VMID=%d usr=/dev/sda6" % vmid
87 #----------------------------------------------------------------------------
88 # Set according to whether you want the domain restarted when it exits.
89 # The default is False.
90 #restart = True
92 #============================================================================