Subversion Repositories havirt

Rev

Rev 35 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

=== Overview

Basic 

    havirt [command [action]] [flags]

command is actually a module name, action is a function (sub) within the
module, and flags can be placed anywhere, Thus,

    havirt domain list

loads the domain module and runs the list function. To send the output to
a tab separated value, you can use the -f flag, so the following are
equivilent

    havirt -f tsv domain list
    havirt domain list -f tsv
    havirt domain -f tsv list

Base modules are:

- **domain**: Work with individual virtual servers, called domains under virtlib
- **node**: Work with hypervisors, called nodes under virtlib
- **cluster**: Work with the entire cluster of hypervisors

Each command has a help parameter which is called if no action is passed (or the action is
help). The commands *havirt node* and *havirt node help* are equivilent

=== domain.pm module commands

==== update [domainname|-t domainname]
   updates capabilities on one or more domains by reading and parsing the files
   stored in conf/ and updating var/status.yaml
   default is to rescan all domains

==== list [--format|-f screen|tsv]
   Displays all domains with some statistics about them as screen or tsv 
   default is to display to fixed width for screen display

==== start domainname [node]
   Checks to ensure domain not running on any node, and starts domainname on 
   requested node. Displays an error message if domain configuration not
   found, or the domain is found to be running somewhere in the cluster.
   Verifies domain not running by rescanning all nodes
   If node not set, will start on the current node (one which user logged into).

==== shutdown domainname
   Initiates a shutdown on a running domain and sets "maintenance" flag so
   keepalive will not restart it

==== migrate domainname [node]
   migrates domain from current node to target. If target node not specified
   will be automatically selected with least used node

==== new [domainname]
   Displays a virt-install command that will fill in several blanks such as
   an unused VNC port, a newly generated UUID and a randomly generated
   MAC address. If domainname is passed in, will insert that also.

   Uses the file virt-install.template in the havirt directory

   WARNING: MAC address randomly generated with prefix of '00163e' (assigned
   to XEN) and is not guaranteed to be unique in cluster at this time.


=== node.pm module commands

==== update [nodename|-t nodename]
   Updates capabilities on one or more nodes. If node is not currently in
   database, will be added
   default is all nodes

==== add - convenience alias for update

==== list [--format|-f screen|tsv]
   Lists all nodes with some statistics about them as screen or tsv (default
   screen)

==== scan [nodename|-t nodename][-y]
   Updates list of domains on one or more existing nodes
   This should be run regularly via a cron job to keep the database up to
   date.
   Will NOT scan if the most recent scan has taken place less thn 5 minutes
   ago, determined by timestamp on file 'lastscan'). To force a new scan
   pass the -y flag, or delete lastscan
   default is scan all nodes



=== cluster.pm module

==== status [--format|-f screen|tsv]
   displays some stats on resources used on each node