Rev 24 | Rev 26 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
# havirt
### Script to macro manage cluster of nodes (hypervisors) and the domains
(virtuals) on them. Used as an extension to virsh, which it calls quite often.
All nodes must be able to make an ssh connection to all other nodes using
public key (no passwords). Note that this includes being able to make an ssh
connection to itself as, at this time, it simply makes an ssh connection to
whatever node is defined.
Very similar to virsh (on purpose); just adds some protection against
running domains on multiple nodes, allowing monitoring, etc... Samples are:
virsh start domainname # virsh way
havirt domain start domainname nodename
These will both start domainname. The virsh command will start it on the
node you are currently logged into. The havirt command will first verify
domainname is not running on any node, verify the target node has enough
resources, then start it on nodename (or the current node, if nodename not
specified) and modify it's state file to reflect the status change.
The other difference is that the virsh command uses the configuration
domainname.xml stored in /etc/virtlib/qemu, while havirt does a 'virsh
create' using the domainname.xml stored in installdir/conf.
By default, havirt will simply emit the command it will normally run. If the
--yes (-y) flag is passed, it will execute the command for you.
havirt creates two subdirectories, installdir/conf/ and installdir/var/ if
they don't exist. conf/ stores the xml configuration of all domains, while
var/ stores the state file (yaml) and some temporary files.
havirt also creates a configuration file (config.yaml) in the executables
directory. This allows you to modify the default behaviour of the program
more easily. See config.sample.yaml if you want to manually create it,
or for documentation on what can be modified.