[libvirt-users] some problem with snapshot by libvirt

Eric Blake eblake at redhat.com
Mon May 28 15:21:41 UTC 2012

On 05/27/2012 06:39 PM, xingxing gao wrote:
> Hi,all,i am using libvirt to manage my vm,in these days i am testing
> the libvirt snapshot ,but meet some problem:
> the snapshot was created from this command:
> snapshot-create-as win7    --disk-only --diskspec
> vda,snapshot=external  --diskspec hda,snapshot=no
> but when i tried to revert from the snapshot which created from the
> above command ,i got error below:
> virsh # snapshot-revert win7 1338041515 --force
> error: unsupported configuration: revert to external disk snapshot not
> supported yet

Yep.  You've run into a case where I haven't yet been able to code
things.  The problem is that reverting to a disk image has a question -
you are starting with two files (the snapshot backing file and the new
qcow2 wrapper), but the moment you reload the backing file for
modification, you invalidate the qcow2 wrapper.  There are two sane
options - create yet another qcow2 wrapper around the same backing file,
or delete the qcow2 wrapper as part of reverting to the snapshot, but we
would probably need two new flags to the virDomainRevertToSnapshot API
to select one of these two behaviors.  In the meantime, the only way to
revert to a disk-only snapshot is to manually edit the domain XML to
match what you want to do, possibly with manual qemu-img operations as well.

Help in writing the patches to improve the functionality would be welcome.

Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120528/8b4a825c/attachment.sig>

More information about the libvirt-users mailing list