[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] New domain control/creation tools

I've just checked in a new suite of domain control tools into the
1.2 and 1.3 (unstable) trees. I'd appreciate it if users could
exercise the new tools and provide feedback. Assuming there
aren't any show stoppers, I'm hoping we can officially announce
1.2 and release a new DemoCD iso later in the week.

The source is on bk://xen.bkbits.net/xeno-1.2.bk and there's also
a src and binary tar ball available:

The tools require python version 2.2 or newer to operate. If you
intend to use the new Virtual Disk management tool you'll need to
install the sqlite library with the pysqlite python
bindings. I've prepared a tar ball containing just the binaries
that can be downloaded from:

There's currently very little documentation for the new tools,
but I've updated README.CD to give some example usage. Having
installed the tools, you'll need to update '/etc/xc/defaults' to
suit your environment.  You may wish to create a different
/etc/xc/X file for each VM you run, or use one file as a template
for several VMs and pass parameters into the script to control
its operation. The 'defaults' and 'democd' scripts are two

I'd be very grateful for any contributions toward the
documentation or FAQ.

Here's hoping you like the new tools!


 - general tool for controling running domains
  Usage: xc_dom_control.py [command] <params>
  stop      [dom]        -- pause a domain
  start     [dom]        -- un-pause a domain
  shutdown  [dom]        -- request a domain to shutdown
  destroy   [dom]        -- immediately terminate a domain
  pincpu    [dom] [cpu]  -- pin a domain to the specified CPU
  save      [dom] [file] -- suspend a domain's memory to file
  restore   [file]       -- resume a domain from a file
  list                   -- print info about all domains
  listvbds               -- print info about all virtual block devs
  cpu_bvtset [dom] [mcuadv] [warp] [warpl] [warpu]
                         -- set scheduling parameters for domain
  cpu_bvtslice [slice]   -- default scheduler slice
  vif_stats [dom] [vif]  -- get stats for a given network vif
  vif_addip [dom] [vif] [ip]  -- add an IP address to a given vif
  vif_setsched [dom] [vif] [bytes] [usecs] -- rate limit vif bandwidth
  vif_getsched [dom] [vif] -- print vif's scheduling parameters
  vbd_add [dom] [uname] [dev] [mode] -- make disk/partition uname available to 
                            domain as dev e.g. 'vbd_add phy:sda3 hda1 rw'
  vbd_remove [dom] [dev] -- remove disk or partition attached as 'dev' 

 - This tool is used to create and start new domains. It reads defaults
from a file written in Python, having allowed variables to be set and
passed into the file. Further command line arguments allow the
defaults to be overridden. The defaults for each parameter are listed
in [] brackets. Arguments are as follows:

Arguments to control the parsing of the defaults file:
 -f config_file   -- Use the specified defaults script. 
                     Default: ['/etc/xc/defaults']
 -D foo=bar       -- Set variable foo=bar before parsing config
                     E.g. '-D vmid=3:ip='
 -h               -- Print extended help message, including all arguments
 -n               -- Dry run only, don't actually create domain

The config file 'defaults' requires the following variable to be defined:
 vmid             -- Numeric identifier for the new domain, used to calculate
                     the VM's IP address and root partition. E.g. -Dvmid=1

 - tool for manipulating virtual disks
   Usage: xc_vd_tool command <params>

   initalise [dev] [[ext_size]]  - init. a physcial partition to store vd's
   create [size] [[expiry]]      - allocate a vd of specified size (and expiry)
   delete [vdid]                 - delete a vd
   import [filename] [[expiry]]  - create a vd and populate w/ image from file
   export [vdid] [filename]      - copy vd's contents to a file
   setexpiry [vdid] [[expiry]]   - update the expiry time for a vd
   list                          - list all the unexpired virtual disks  
   undelete [vdid] [[expiry]]    - attempts to recover an expired vd
   freespace                     - print out the amount of space in free pool

   vdid      - the virtual disk's identity string
   size      - measured in MB
   expiry    - is the expiry time of the virtual disk in seconds from now
               (0 = don't expire) 
   device    - physical partition to 'format' to hold vd's. e.g. hda4
   ext_size  - extent size (default 64MB)

The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.