[fedora-virt] How to revert an external snapshot

Cole Robinson crobinso at redhat.com
Wed Mar 4 14:49:09 UTC 2015


On 03/04/2015 09:16 AM, Dario Lesca wrote:
> I have generate an external snapshot with this command:
> 
>> vm='win7-64'
>>
>> virsh snapshot-create-as "$vm" "$vm-snap1" "snap1 description" \
>>   --diskspec vda,file="/virt/$vm-snap1.qcow2" \
>>   --disk-only --atomic
> 
> My virsh / libvirt is the last from Fedora 21
> 
>> [root at dodo:/virt]# virsh --version
>> 1.2.9.2
> 
> Now I have this situation:
> 
>> [root at dodo:/virt]# ll win7-64*
>> -rw-r--r-- 1 qemu qemu 17182753280  4 mar 14.14 win7-64.qcow2
>> -rw-r--r-- 1 root root   558628864  4 mar 14.35 win7-64-snap1.qcow2
>>
>> root at dodo:/virt]# virsh snapshot-list win7-64
>>  Nome                 Creation Time             Stato
>> ------------------------------------------------------------
>>  win7-64-snap1        2015-03-04 14:21:15 +0100 shutoff
> 
> But if I run the revert command this is the result:
> 
>> [root at dodo:/virt]# virsh snapshot-revert win7-64 win7-64-snap1
>> errore: unsupported configuration: revert to external snapshot not supported yet
> 
> There is some way to revert my vm to previous state?
> 
> Many thanks for help.
> 

You can do it by hand: Power off the VM, edit the XML to point at the desired
disk image.

However, if you point at the root file and make disk changes, the snapshot
overlay will then become invalid. So if you want to use the root contents
again, you'll need to create another overlay based on the root image, and
point your VM at that. This confusion is one of the reasons that stuff isn't
implemented in libvirt yet

- Cole


More information about the virt mailing list