Subversion Repositories havirt

Rev

Rev 24 | Details | Compare with Previous | Last modification | View Log | RSS feed

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