[libvirt] [FYI] Skript to extract qcow2 snapshot info to libvirt snapshot xml
Philipp Hahn
hahn at univention.de
Thu Oct 20 06:50:35 UTC 2011
Hello,
I sometimes get foreign qcow2 images with embedded snapshots. Without the
corresponding XML files libvirt doesn't recognize them. Therefor I created
the attached script to fake-create the missing snapshot XML files.
Be advised that the XML files might not work in all cases, especially when the
configuration was changed between snapshots, but at least I prefer a solution
working 95% of the times instead of 0% ;-)
And since I already wrote it, others might find it useful as well.
Sincerely
Philipp Hahn
PS: An a drink of their reasonable choosing to the first one writing a
qemu-img version printing (shell-)parsable output :-(
--
Philipp Hahn Open Source Software Engineer hahn at univention.de
Univention GmbH Linux for Your Business fon: +49 421 22 232- 0
Mary-Somerville-Str.1 D-28359 Bremen fax: +49 421 22 232-99
http://www.univention.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qcow2-snap-scan.sh
Type: application/x-shellscript
Size: 3326 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111020/c3f5d5c1/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111020/c3f5d5c1/attachment-0001.sig>
More information about the libvir-list
mailing list