view tools/control/doc/USAGE-cmdline @ 644:5e169da77286

bitkeeper revision 1.339 (3f0d6d60VROcPVK9573_fpTcuFCUXg)

Rename domctl.xml to xenctl.xml
date Thu Jul 10 13:42:56 2003 +0000 (2003-07-10)
parents 4750dfc4d829
line source
2 -------------------------------
4 It is important that no changes be made to the virtual disk manager through
5 the command line while the web interface is running!
7 If you use the web interface at all, it is NOT safe to call:
8 xenctl partitions add
9 xenctl vd create
10 xenctl vd delete
11 xenctl vd refresh
13 Your changes will likely be lost, or the virtual disks left in an
14 inconsistent state, or data on them corrupted or erased.
16 Other xenctl functions do not modify VDM state and are therefore safe,
17 e.g. it's okay to do domain control from the command line if the web
18 interface is running.
20 General
21 -------
23 Invoking xenctl with no arguments, or with 'help' gives general usage
24 xenctl help command, or xenctl command -?, gives specific command help
26 Domain control
27 --------------
29 xenctl's command line interface is based on domctl. Defaults for domain
30 creation are found in /etc/xenctl.xml which has the same format as the
31 old domctl.xml
33 Creating a domain: xenctl domain new <parameters>
34 All parameters may be omitted to get defaults from xenctl.xml, see help
35 for ful details of available parameters.
37 Starting a domain: xenctl domain start -n<domain_no>
38 Stopping a domain: xenctl domain stop -n<domain_no>
39 Destroying a domain: xenctl domain destroy -n<domain_no> (add -f to force
40 destruction of a running domain)
42 Listing all domains: xenctl domain list
44 Physical disk access management
45 -------------------------------
47 Grant read-only access to a disk or partition:
48 xenctl physical grant -n<domain_no> -p<partition_name> (e.g. sda10, sdc..etc)
49 Grant read-write access to a disk or partition:
50 xenctl physical grant -w -n<domain_no> -p<partition_name>
51 (if you grant read-write to a domain which already has read for the same
52 partition, it will be upgraded quite happily, and vice versa)
53 Revoke access to a disk or partition:
54 xenctl physical revoke -n<domain_no> -p<partition_name>
55 List access a domain has:
56 xenctl physical list -n<domain_no>
57 will list all the physical disks/partitions which the given domain may access
58 and the rights assigned.
60 Virtual disk management
61 -----------------------
63 Add a disk partition as a XenoPartition (raw space to create VDs on):
64 xenctl partitions add -p<partition_name> -c<chunk_size>
65 adds the partition, splitting it up into chunks of the size given
66 Sizes can all be specified as k, m, g.
67 Lists partitions:
68 xenctl partitions list
69 XenoPartitions are shown in [ ]
71 Create a virtual disk:
72 xenctl vd create -n<name> -s<size> [-e<expiry>]
73 Name is for identification only and need not be unique. Expiry may be none.
74 Size can be in k, m, g
75 You will be given a 10-digit key for the disk which is its unique identifier.
76 Delete a virtual disk:
77 xenctl vd delete -k<key>
78 Virtual disks with VBDs mapped to them may not be deleted.
79 Refresh the expiry on a disk:
80 xenctl vd refresh -k<key> [-e<expiry>]
81 Sets a new expiry, may be none.
82 List virtual disks:
83 xenctl vd show
85 List space free:
86 xenctl vd free
87 Shows how much space has been added with partitions add, but not allocated
88 to a virtual disk.
90 Create a virtual block device:
91 xenctl vbd create -n<domain> -k<key> -v<vbd_number> [-w]
92 Maps the disk with the given key into the domain. -w allows read-write.
93 vbd number 0 = /dev/xvda, number 1 = /dev/xvdb, and so on.
94 Lists virtual block devices:
95 xenctl vbd show
97 Virtual block devices are automatically deleted when their domain is destroyed.