14 |
rodolico |
1 |
havirt [command [action]]
|
|
|
2 |
|
|
|
3 |
command is actually a module name, so havirt domain simply loads the domain.pm module. Base modules are:
|
|
|
4 |
domain - Work with individual virtual servers, called domains under virtlib
|
|
|
5 |
node - Work with hypervisors, called nodes under virtlib
|
|
|
6 |
cluster - Work with the entire cluster of hypervisors
|
|
|
7 |
|
|
|
8 |
Each command has a help parameter which is called if no action is passed (or the action is help)
|
|
|
9 |
So, the commands 'havirt node' and 'havirt node help' are the same
|
|
|
10 |
|
|
|
11 |
=== domain.pm module commands
|
|
|
12 |
|
|
|
13 |
update [domainname|-t domainname]
|
|
|
14 |
updates capabilities on one or more domains by reading and parsing the files
|
|
|
15 |
stored in conf/ and updating var/status.yaml
|
|
|
16 |
default is to rescan all domains
|
|
|
17 |
|
|
|
18 |
list [--format|-f screen|tsv]
|
|
|
19 |
Displays all domains with some statistics about them as screen or tsv
|
|
|
20 |
default is to display to fixed width for screen display
|
|
|
21 |
|
|
|
22 |
start domainname [node]
|
|
|
23 |
Checks to ensure domain not running on any node, and starts domainname on
|
|
|
24 |
requested node. Displays an error message if domain configuration not
|
|
|
25 |
found, or the domain is found to be running somewhere in the cluster.
|
|
|
26 |
Verifies domain not running by rescanning all nodes
|
|
|
27 |
If node not set, will start on the current node (one which user logged into).
|
|
|
28 |
|
|
|
29 |
shutdown domainname
|
|
|
30 |
Initiates a shutdown on a running domain and sets "maintenance" flag so
|
|
|
31 |
keepalive will not restart it
|
|
|
32 |
|
|
|
33 |
migrate domainname [node]
|
|
|
34 |
migrates domain from current node to target. If target node not specified
|
|
|
35 |
will be automatically selected with least used node
|
|
|
36 |
|
|
|
37 |
new [domainname]
|
|
|
38 |
Displays a virt-install command that will fill in several blanks such as
|
|
|
39 |
an unused VNC port, a newly generated UUID and a randomly generated
|
|
|
40 |
MAC address. If domainname is passed in, will insert that also.
|
|
|
41 |
|
|
|
42 |
Uses the file virt-install.template in the havirt directory
|
|
|
43 |
|
|
|
44 |
WARNING: MAC address randomly generated with prefix of '00163e' (assigned
|
|
|
45 |
to XEN) and is not guaranteed to be unique in cluster at this time.
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
=== node.pm module commands
|
|
|
49 |
|
|
|
50 |
update [nodename|-t nodename]
|
|
|
51 |
Updates capabilities on one or more nodes. If node is not currently in
|
|
|
52 |
database, will be added
|
|
|
53 |
default is all nodes
|
|
|
54 |
|
|
|
55 |
add - convenience alias for update
|
|
|
56 |
|
|
|
57 |
list [--format|-f screen|tsv]
|
|
|
58 |
Lists all nodes with some statistics about them as screen or tsv (default
|
|
|
59 |
screen)
|
|
|
60 |
|
|
|
61 |
scan [nodename|-t nodename][-y]
|
|
|
62 |
Updates list of domains on one or more existing nodes
|
|
|
63 |
This should be run regularly via a cron job to keep the database up to
|
|
|
64 |
date.
|
|
|
65 |
Will NOT scan if the most recent scan has taken place less thn 5 minutes
|
|
|
66 |
ago, determined by timestamp on file 'lastscan'). To force a new scan
|
|
|
67 |
pass the -y flag, or delete lastscan
|
|
|
68 |
default is scan all nodes
|
|
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
=== cluster.pm module
|
|
|
73 |
|
|
|
74 |
status [--format|-f screen|tsv]
|
|
|
75 |
displays some stats on resources used on each node
|