Re: some problem with snapshot by libvirt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux