Subversion Repositories havirt

Rev

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

Rev Author Line No. Line
23 rodolico 1
# havirt
2
 
3
### Script to macro manage cluster of nodes (hypervisors) and the domains
26 rodolico 4
(virtuals) on them.
9 rodolico 5
 
26 rodolico 6
Used as an extension to virsh, which it calls quite often, but with a
7
cluster of nodes (hypervisors) with shared block devices (tested with
8
iSCSI).
9
 
10
Also, includes code to verify there are enough resources on a node
11
for the requested action, and protection against running the same domain
12
on multiple nodes simultaneously, which an result in block device
13
corruption.
14
 
9 rodolico 15
All nodes must be able to make an ssh connection to all other nodes using 
26 rodolico 16
public key (no passwords).
9 rodolico 17
 
24 rodolico 18
Very similar to virsh (on purpose); just adds some protection against
19
running domains on multiple nodes, allowing monitoring, etc... Samples are:
9 rodolico 20
 
24 rodolico 21
    virsh start domainname # virsh way
22
    havirt domain start domainname nodename
9 rodolico 23
 
24 rodolico 24
These will both start domainname. The virsh command will start it on the
25
node you are currently logged into. The havirt command will first verify
25 rodolico 26
domainname is not running on any node, verify the target node has enough
27
resources, then start it on nodename (or the current node, if nodename not 
28
specified) and modify it's state file to reflect the status change.
9 rodolico 29
 
24 rodolico 30
The other difference is that the virsh command uses the configuration
31
domainname.xml stored in /etc/virtlib/qemu, while havirt does a 'virsh
26 rodolico 32
create' using the domainname.xml stored in installdir/conf. This allows
33
sharing of the same domain configuration on all nodes, at the expense of
34
some functionality.
23 rodolico 35
 
24 rodolico 36
By default, havirt will simply emit the command it will normally run. If the
26 rodolico 37
flag --dryrun is defaulted to false (0) in the config file, will actually
38
run the command(s) unless it is turned back on by passing as a cli
39
parameter (see config.sample.yaml).
9 rodolico 40
 
24 rodolico 41
havirt creates two subdirectories, installdir/conf/ and installdir/var/ if
26 rodolico 42
they don't exist.
9 rodolico 43
 
26 rodolico 44
   conf/ stores the xml configuration of all domains
45
   var/ stores the state file (yaml) and some temporary files.
46
 
47
havirt automatically creates a configuration file (config.yaml) in the executables
48
directory if it doesn't exist, allowing you to modify the default behavior
49
of the system.
28 rodolico 50
 
51
Can be downloaded via subversion at
52
    http://svn.dailydata.net/svn/havirt/stable
53
Highly recommended you do not use trunk, as we modify that on a regular
54
basis and check in broken code sometimes