Payes Anand
2014-Nov-21 19:56 UTC
Re: [libvirt-users] some problem with snapshot by libvirt
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 aswell.> > 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.
Eric Blake
2014-Nov-21 21:51 UTC
Re: [libvirt-users] some problem with snapshot by libvirt
On 11/21/2014 12:56 PM, Payes Anand wrote:>> Yep. You've run into a case where I haven't yet been able to code >> things.>> >> 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?As of the latest 1.2.10 release, we are still awaiting someone to write patches for reverting to external snapshots.> If not is there any alternate.You can do things manually, via qemu-img and editing domain xml. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org