[fedora-virt] How to revert an external snapshot

Kashyap Chamarthy kashyapc at fedoraproject.org
Thu Mar 5 09:00:29 UTC 2015


On Wed, Mar 04, 2015 at 05:43:30PM +0100, Dario Lesca wrote:
> Il giorno mer, 04/03/2015 alle 09.49 -0500, Cole Robinson ha scritto:
> > On 03/04/2015 09:16 AM, Dario Lesca wrote:
> > > I have generate an external snapshot with this command:
> > > ...
> > > There is some way to revert my vm to previous state?
> 
> > You can do it by hand: Power off the VM, edit the XML to point at the desired
> > disk image.
> 
> Ok, thanks Cole, I have modify the point at the disk image to original
> root disk image:
> 
>         before "<source file='/virt/win7-64-snap1.qcow2'/>"
>         after "<source file='/virt/win7-64.qcow2'/>"
> 
> Then I have remove the image overlay /virt/win7-64-snap1.qcow2
> 
> Now all work fine.
> 
> > 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
> 
> But now when I list snapshot the snapshot removed is showed:
> 
> > [root at dodo:/virt]# virsh snapshot-list win7-64
> > Nome                 Creation Time             Stato
> > ------------------------------------------------------------
> > win7-64-snap1        2015-03-04 14:21:15 +0100 shutoff
> 
> So, I have remove the machine and recreate it and the snapshot is gone
> away.
> 
> Thanks for help.

Along with what Cole said, here is some more explanation
into revert/deletion of external snapshots (written by Eric Blake)

    http://wiki.libvirt.org/page/I_created_an_external_snapshot,_but_libvirt_won%27t_let_me_delete_or_revert_to_it

And, also look up the archives of 'libvirt-users' mailing list for
similar questions -- there's lot of useful info there too.

-- 
/kashyap


More information about the virt mailing list