<div dir="ltr">Eric Blake <eblake@...> writes:<br><br>> <br>> On 05/27/2012 06:39 PM, xingxing gao wrote:<br>> > Hi,all,i am using libvirt to manage my vm,in these days i am testing<br>> > the libvirt snapshot ,but meet some problem:<br>> > <br>> > the snapshot was created from this command:<br>> > snapshot-create-as win7    --disk-only --diskspec<br>> > vda,snapshot=external  --diskspec hda,snapshot=no<br>> > <br>> > but when i tried to revert from the snapshot which created from the<br>> > above command ,i got error below:<br>> > <br>> > virsh # snapshot-revert win7 1338041515 --force<br>> > error: unsupported configuration: revert to external disk snapshot not<br>> > supported yet<br>> <br>> Yep.  You've run into a case where I haven't yet been able to code<br>> things.  The problem is that reverting to a disk image has a question -<br>> you are starting with two files (the snapshot backing file and the new<br>> qcow2 wrapper), but the moment you reload the backing file for<br>> modification, you invalidate the qcow2 wrapper.  There are two sane<br>> options - create yet another qcow2 wrapper around the same backing file,<br>> or delete the qcow2 wrapper as part of reverting to the snapshot, but we<br>> would probably need two new flags to the virDomainRevertToSnapshot API<br>> to select one of these two behaviors.  In the meantime, the only way to<br>> revert to a disk-only snapshot is to manually edit the domain XML to<br>> match what you want to do, possibly with manual qemu-img operations as well.<br>> <br>> Help in writing the patches to improve the functionality would be welcome.<br>> <br><br>Has the issue ( revert to external disk snapshot ) been solved in later versions of libvirt?<br><br>I am using:<br>Compiled against library: libvirt 1.2.2<br>Using library: libvirt 1.2.2<br>Using API: QEMU 1.2.2<br>Running hypervisor: QEMU 2.1.92<br><br>On trying to revert to an  external snapshot,<br>Getting the error: revert to external disk snapshot not supported yet<br><br>If not is there any alternate.<br></div>