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 version: virsh # version Compiled against library: libvir 0.9.4 Using library: libvir 0.9.4 Using API: QEMU 0.9.4 Running hypervisor: QEMU 1.0.93
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 yetYep. 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>
sure you can add the list back in, 2012/5/29 Eric Blake <eblake at redhat.com>:> On 05/29/2012 09:03 AM, xingxing gao wrote: >> to create snapshot ,I did ? step below: > > I'd really rather answer this in public; do I have your permission to > add the list back in, or better yet, can you repost to the list? > > Also, the list tends to frown on top-posting. > >>> Did you mean for this to go to the list, so that others may chime in or >>> benefit from the answers? >>> > > > -- > Eric Blake ? eblake at redhat.com ? ?+1-919-301-3266 > Libvirt virtualization library http://libvirt.org >
Eric Blake <eblake@...> writes:> > 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. >Has the issue ( revert to external disk snapshot ) been solved in later versions of libvirt? I am using: Compiled against library: libvirt 1.2.2 Using library: libvirt 1.2.2 Using API: QEMU 1.2.2 Running hypervisor: QEMU 2.1.92 On trying to revert to an external snapshot, Getting the error: revert to external disk snapshot not supported yet If not is there any alternate.