Subversion Repositories havirt

Rev

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