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.