[libvirt] [Patch] enable --checkpoint option in 'virsh save'

Matt McCowan matt.mccowan at metoceanengineers.com
Thu Feb 12 05:07:34 UTC 2009


Folks.
I'm working on a scenario where I would like to provide my backup subsystems with a clean disk and ram state of any given VM, without necessitating shutting down the a VM.
Xen's 'xm save' function with the '-c' (checkpoint) argument made sense in that I could checkpoint save the VM, take a snapshot of the LV containing the domain and its 'save' dump then resume the domain. Unfortunately out-of-the-box the Xen implementation did not pause the domain after the checkpoint, but resumed it automatically. Fastforward to using kvm ...
Qemu/kvm with it's 'migrate' command by default left the domain paused after creating a state dump - just what I was looking for. A look at the libvirt code revealed that 'virsh save' carried out a migrate, then shut the domain down. So I have tried implementing a --checkpoint option into the save function using the --live option to the 'virsh migrate' function as a bit of a template.
I'm a sysadmin, not a coder, so please forgive any oversights and all the other coding rules that may be broken. As mentioned before I did try to simply copy how the migrate --live option is used throughout.

Patch (against 0.6.0) attached. I have also filed a feature request under bugzilla. If the additional feature is seen as warranted, please let me know what I can do to help implement it if the patch is not the way to go about it.

Thankyou very much for Libvirt

Regards
Matt McCowan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-0.6.0-checkpoint.patch
Type: text/x-patch
Size: 13144 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090212/8d22a9ea/attachment-0001.bin>


More information about the libvir-list mailing list