Bug 739339 - virsh snapshot-revert is not reverting the disk image
Summary: virsh snapshot-revert is not reverting the disk image
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 15
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-17 21:12 UTC by Brian Lane
Modified: 2012-01-04 19:11 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-04 19:11:18 UTC


Attachments (Terms of Use)

Description Brian Lane 2011-09-17 21:12:15 UTC
Description of problem:
1. Ceated a new domain using a qcow2 img file as the storage, installed F15 on it, shut it down.
2. Created a snaphshot using virsh snapshot-create
3. Started the domain and updated its packages, shut it down.
4. Created a 2nd snapshot.

When I run virsh snapshot-revert on the domain I get no output from virsh and it returns quickly. Nothing in /var/log/messages either. I start the domain and it has not reverted the disk.

virsh snapshot-list does list the snapshots.

If I use qemu-img it lists the disk snapshots and I am able to use qemu-img snapshot -a X to switch snapshots successfully.

Comment 1 Fedora Admin XMLRPC Client 2011-09-22 17:53:24 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Fedora Admin XMLRPC Client 2011-09-22 17:57:14 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Fedora Admin XMLRPC Client 2011-11-30 20:04:05 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora Admin XMLRPC Client 2011-11-30 20:04:10 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Fedora Admin XMLRPC Client 2011-11-30 20:08:26 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Fedora Admin XMLRPC Client 2011-11-30 20:08:30 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Eric Blake 2012-01-04 19:11:18 UTC
This is a known issue, due to a change in qemu behavior, and fixed in libvirt version 0.9.5 and later.  However, the fix is rather invasive, and I'm not sure it is feasible to backport the appropriate patch and all prerequisites into F15; at this point, I'd rather close this as fixed in F16 and suggest that you upgrade.

commit 25fb3ef1e1b9927c8f31285f4404620317b7f7db
Author: Eric Blake <eblake@redhat.com>
Date:   Fri Aug 26 16:17:41 2011 -0600

    snapshot: properly revert qemu to offline snapshots
    
    Commit 5e47785 broke reverts to offline system checkpoint snapshots
    with older qemu, since there is no longer any code path to use
    qemu -loadvm on next boot.  Meanwhile, reverts to offline system
    checkpoints have been broken for newer qemu, both before and
    after that commit, since -loadvm no longer works to revert to
    disk state without accompanying vm state.  Fix both of these by
    using qemu-img to revert disk state.


Note You need to log in before you can comment on or make changes to this bug.