Hi Thomas,
Thomas Sjolshagen schrieb:
Quoting "Dirk H. Schulz" <dirk.schulz@xxxxxxxxxxxxx>:
Hi folks,
I do not understand this as the virtual machine image is stored
wherever it is configured in the virtual machine config file - and
what does it have to do with snapshots (i. e. what is a "snapshot
directory")?
The snapshot directory is the directory into which vm.sh will "virsh
save" the memory contents of the guest when shutting it down (when
use_virsh="1" at least). As I understand it, during rgmanager (or
clusvcadm -d) activities, the vm is saved to the snapshot directory
and restored from the file in that directory - if it exists.
Thanks for pointing to the right direction. I should have looked more
deeply into vm.sh - you are right, it is used only in conjunction with
use_virsh=1 so I can look up there what is done exactly (when I need it,
at the moment it is all xm).
Somewhat unrelated; I'd love to have a parameter that defines the
"stop" action as either "snapshot" or "shutdown". It takes a long time
to snapshot 10 guests to a gfs2 file system and the restore
functionality does a valiant effort, but the Linux kernel does not
seem to like being restored as of yet (the guest usually hangs after a
seemingly arbitrary amount of time). As a result, my innodb based
tables get a little cranky from the interruption/crash.
Is far as I can see in vm.sh the standard action is shutdown:
case $1 in
start)
validate_all || exit $OCF_ERR_ARGS
do_start
exit $?
;;
stop)
validate_all || exit $OCF_ERR_ARGS
do_stop shutdown destroy
exit $?
;;
In the "do_stop" line the method is set as a parameter to the do_stop
function (which hands it to the xm/virsh stop functions). If you need
both you could seperate a vm-stop.sh and vm-snap.sh script and use
relevant <vm-stop name=...> containers in cluster.conf (I did not test
that but it should work like this, should it not?).
Dirk
--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster