ia64/xen-unstable

annotate tools/examples/xmexample1 @ 19648:f0e2df69a8eb

x86 hvm: Allow cross-vendor migration

Intercept #UD and emulate SYSCALL/SYSENTER/SYSEXIT as necessary.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue May 26 15:01:36 2009 +0100 (2009-05-26)
parents 0942baa2a088
children
rev   line source
iap10@2308 1 # -*- mode: python; -*-
iap10@2308 2 #============================================================================
iap10@2308 3 # Python configuration setup for 'xm create'.
iap10@2308 4 # This script sets the parameters used when a domain is created using 'xm create'.
iap10@2308 5 # You use a separate script for each domain you want to create, or
iap10@2308 6 # you can set the parameters for the domain on the xm command line.
iap10@2308 7 #============================================================================
iap10@2308 8
iap10@2308 9 #----------------------------------------------------------------------------
iap10@2308 10 # Kernel image file.
cl349@3983 11 kernel = "/boot/vmlinuz-2.6.10-xenU"
iap10@2308 12
iap10@2308 13 # Optional ramdisk.
iap10@2308 14 #ramdisk = "/boot/initrd.gz"
iap10@2308 15
iap10@2308 16 # The domain build function. Default is 'linux'.
iap10@2308 17 #builder='linux'
iap10@2308 18
iap10@2308 19 # Initial memory allocation (in megabytes) for the new domain.
stekloff@9788 20 #
stekloff@9788 21 # WARNING: Creating a domain with insufficient memory may cause out of
stekloff@9788 22 # memory errors. The domain needs enough memory to boot kernel
stekloff@9788 23 # and modules. Allocating less than 32MBs is not recommended.
iap10@2308 24 memory = 64
iap10@2308 25
iap10@2308 26 # A name for your domain. All domains must have different names.
iap10@2308 27 name = "ExampleDomain"
iap10@2308 28
kaf24@10063 29 # 128-bit UUID for the domain. The default behavior is to generate a new UUID
kaf24@10063 30 # on each call to 'xm create'.
kaf24@10063 31 #uuid = "06ed00fe-1162-4fc4-b5d8-11993ee4a8b9"
kaf24@10063 32
emellor@8198 33 # List of which CPUS this domain is allowed to use, default Xen picks
emellor@8198 34 #cpus = "" # leave to Xen to pick
emellor@8198 35 #cpus = "0" # all vcpus run on CPU0
keir@17628 36 #cpus = "0-3,5,^1" # all vcpus run on cpus 0,2,3,5
keir@17628 37 #cpus = ["2", "3"] # VCPU0 runs on CPU2, VCPU1 runs on CPU3
iap10@2308 38
cl349@3451 39 # Number of Virtual CPUS to use, default is 1
cl349@3451 40 #vcpus = 1
cl349@3451 41
iap10@2308 42 #----------------------------------------------------------------------------
iap10@2308 43 # Define network interfaces.
iap10@2308 44
emellor@8330 45 # By default, no network interfaces are configured. You may have one created
emellor@8330 46 # with sensible defaults using an empty vif clause:
emellor@8330 47 #
emellor@8330 48 # vif = [ '' ]
emellor@8330 49 #
emellor@8330 50 # or optionally override backend, bridge, ip, mac, script, type, or vifname:
emellor@8330 51 #
emellor@8330 52 # vif = [ 'mac=00:16:3e:00:00:11, bridge=xenbr0' ]
emellor@8330 53 #
emellor@8330 54 # or more than one interface may be configured:
emellor@8330 55 #
emellor@8330 56 # vif = [ '', 'bridge=xenbr1' ]
iap10@2308 57
emellor@8330 58 vif = [ '' ]
iap10@2308 59
iap10@2308 60 #----------------------------------------------------------------------------
iap10@2308 61 # Define the disk devices you want the domain to have access to, and
iap10@2308 62 # what you want them accessible as.
iap10@2308 63 # Each disk entry is of the form phy:UNAME,DEV,MODE
iap10@2308 64 # where UNAME is the device, DEV is the device name the domain will see,
iap10@2308 65 # and MODE is r for read-only, w for read-write.
iap10@2308 66
cl349@3983 67 disk = [ 'phy:hda1,hda1,w' ]
iap10@2308 68
iap10@2308 69 #----------------------------------------------------------------------------
kfraser@13407 70 # Define frame buffer device.
kfraser@13407 71 #
kfraser@13407 72 # By default, no frame buffer device is configured.
kfraser@13407 73 #
kfraser@13407 74 # To create one using the SDL backend and sensible defaults:
kfraser@13407 75 #
keir@19287 76 # vfb = [ 'sdl=1' ]
kfraser@13407 77 #
kfraser@13407 78 # This uses environment variables XAUTHORITY and DISPLAY. You
kfraser@13407 79 # can override that:
kfraser@13407 80 #
keir@19287 81 # vfb = [ 'sdl=1,xauthority=/home/bozo/.Xauthority,display=:1' ]
kfraser@13407 82 #
kfraser@13407 83 # To create one using the VNC backend and sensible defaults:
kfraser@13407 84 #
keir@19287 85 # vfb = [ 'vnc=1' ]
kfraser@13407 86 #
kfraser@13407 87 # The backend listens on 127.0.0.1 port 5900+N by default, where N is
kfraser@13407 88 # the domain ID. You can override both address and N:
kfraser@13407 89 #
keir@19287 90 # vfb = [ 'vnc=1,vnclisten=127.0.0.1,vncdisplay=1' ]
kfraser@13407 91 #
kfraser@13407 92 # Or you can bind the first unused port above 5900:
kfraser@13407 93 #
keir@19287 94 # vfb = [ 'vnc=1,vnclisten=0.0.0.0,vncunused=1' ]
kfraser@13407 95 #
kfraser@13407 96 # You can override the password:
kfraser@13407 97 #
keir@19287 98 # vfb = [ 'vnc=1,vncpasswd=MYPASSWD' ]
kfraser@13407 99 #
kfraser@13407 100 # Empty password disables authentication. Defaults to the vncpasswd
kfraser@13407 101 # configured in xend-config.sxp.
kfraser@13407 102
kfraser@13407 103 #----------------------------------------------------------------------------
shand@6572 104 # Define to which TPM instance the user domain should communicate.
shand@6572 105 # The vtpm entry is of the form 'instance=INSTANCE,backend=DOM'
shand@6572 106 # where INSTANCE indicates the instance number of the TPM the VM
shand@6572 107 # should be talking to and DOM provides the domain where the backend
shand@6572 108 # is located.
shand@6572 109 # Note that no two virtual machines should try to connect to the same
shand@6572 110 # TPM instance. The handling of all TPM instances does require
shand@6572 111 # some management effort in so far that VM configration files (and thus
shand@6572 112 # a VM) should be associated with a TPM instance throughout the lifetime
shand@6572 113 # of the VM / VM configuration file. The instance number must be
shand@6572 114 # greater or equal to 1.
shand@6572 115 #vtpm = [ 'instance=1,backend=0' ]
shand@6572 116
shand@6572 117 #----------------------------------------------------------------------------
iap10@2308 118 # Set the kernel command line for the new domain.
iap10@2308 119 # You only need to define the IP parameters and hostname if the domain's
iap10@2308 120 # IP config doesn't, e.g. in ifcfg-eth0 or via DHCP.
iap10@2308 121 # You can use 'extra' to set the runlevel and custom environment
iap10@2308 122 # variables used by custom rc scripts (e.g. VMID=, usr= ).
iap10@2308 123
iap10@2308 124 # Set if you want dhcp to allocate the IP address.
iap10@2308 125 #dhcp="dhcp"
iap10@2308 126 # Set netmask.
iap10@2308 127 #netmask=
iap10@2308 128 # Set default gateway.
iap10@2308 129 #gateway=
iap10@2308 130 # Set the hostname.
iap10@2308 131 #hostname= "vm%d" % vmid
iap10@2308 132
iap10@2308 133 # Set root device.
maw48@2638 134 root = "/dev/hda1 ro"
iap10@2308 135
iap10@2308 136 # Root device for nfs.
iap10@2308 137 #root = "/dev/nfs"
iap10@2308 138 # The nfs server.
keir@16739 139 #nfs_server = '192.0.2.1'
iap10@2308 140 # Root directory on the nfs server.
iap10@2308 141 #nfs_root = '/full/path/to/root/directory'
iap10@2308 142
iap10@2308 143 # Sets runlevel 4.
iap10@2308 144 extra = "4"
iap10@2308 145
iap10@2308 146 #----------------------------------------------------------------------------
emellor@7153 147 # Configure the behaviour when a domain exits. There are three 'reasons'
emellor@7153 148 # for a domain to stop: poweroff, reboot, and crash. For each of these you
emellor@7156 149 # may specify:
emellor@7156 150 #
emellor@7156 151 # "destroy", meaning that the domain is cleaned up as normal;
emellor@7156 152 # "restart", meaning that a new domain is started in place of the old
emellor@7156 153 # one;
emellor@7156 154 # "preserve", meaning that no clean-up is done until the domain is
emellor@7156 155 # manually destroyed (using xm destroy, for example); or
emellor@7156 156 # "rename-restart", meaning that the old domain is not cleaned up, but is
emellor@7156 157 # renamed and a new domain started in its place.
emellor@7153 158 #
keir@16999 159 # In the event a domain stops due to a crash, you have the additional options:
keir@16999 160 #
keir@16999 161 # "coredump-destroy", meaning dump the crashed domain's core and then destroy;
keir@16999 162 # "coredump-restart', meaning dump the crashed domain's core and the restart.
keir@16999 163 #
emellor@7153 164 # The default is
emellor@7153 165 #
emellor@7153 166 # on_poweroff = 'destroy'
emellor@7153 167 # on_reboot = 'restart'
emellor@7153 168 # on_crash = 'restart'
emellor@7153 169 #
emellor@7153 170 # For backwards compatibility we also support the deprecated option restart
emellor@7153 171 #
emellor@7153 172 # restart = 'onreboot' means on_poweroff = 'destroy'
emellor@7153 173 # on_reboot = 'restart'
emellor@7153 174 # on_crash = 'destroy'
emellor@7153 175 #
emellor@7153 176 # restart = 'always' means on_poweroff = 'restart'
emellor@7153 177 # on_reboot = 'restart'
emellor@7153 178 # on_crash = 'restart'
emellor@7153 179 #
emellor@7153 180 # restart = 'never' means on_poweroff = 'destroy'
emellor@7153 181 # on_reboot = 'destroy'
emellor@7153 182 # on_crash = 'destroy'
iap10@2308 183
emellor@7153 184 #on_poweroff = 'destroy'
emellor@7153 185 #on_reboot = 'restart'
emellor@7153 186 #on_crash = 'restart'
iap10@2308 187
keir@17962 188 #-----------------------------------------------------------------------------
keir@17962 189 # Configure PVSCSI devices:
keir@17962 190 #
keir@17962 191 #vscsi=[ 'PDEV, VDEV' ]
keir@17962 192 #
keir@17962 193 # PDEV gives physical SCSI device to be attached to specified guest
keir@17962 194 # domain by one of the following identifier format.
keir@17962 195 # - XX:XX:XX:XX (4-tuples with decimal notation which shows
keir@17962 196 # "host:channel:target:lun")
keir@17962 197 # - /dev/sdxx or sdx
keir@17962 198 # - /dev/stxx or stx
keir@17962 199 # - /dev/sgxx or sgx
keir@17962 200 # - result of 'scsi_id -gu -s'.
keir@17962 201 # ex. # scsi_id -gu -s /block/sdb
keir@17962 202 # 36000b5d0006a0000006a0257004c0000
keir@17962 203 #
keir@17962 204 # VDEV gives virtual SCSI device by 4-tuples (XX:XX:XX:XX) as
keir@17962 205 # which the specified guest domain recognize.
keir@17962 206 #
keir@17962 207
keir@17962 208 #vscsi = [ '/dev/sdx, 0:0:0:0' ]
keir@17962 209
iap10@2308 210 #============================================================================
keir@17962 211