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