RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1124854 - Libvirt should report error when try to revert guest to external system checkpoint snapshot
Summary: Libvirt should report error when try to revert guest to external system check...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 1124317 (view as bug list)
Depends On: 1071264 1101987
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-30 13:12 UTC by Shanzhi Yu
Modified: 2015-07-22 05:46 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.10.2-48.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-22 05:46:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1252 0 normal SHIPPED_LIVE libvirt bug fix update 2015-07-20 17:50:06 UTC

Description Shanzhi Yu 2014-07-30 13:12:34 UTC
Description of problem:

Succeed reverting to external system checkpoint snapshot

Version-Release number of selected component (if applicable):

# rpm -q libvirt qemu-kvm-rhev
libvirt-0.10.2-41.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.423.el6.x86_64

How reproducible:

100%

Steps to Reproduce:
1. Prepare an running guest
#qemu-img create -f qcow2 /var/lib/libvirt/images/rhel6.img 5G
Formatting '/var/lib/libvirt/images/rhel6.img', fmt=qcow2 size=5368709120 encryption=off cluster_size=65536

#virsh define  /dev/stdin <<EOF
<domain type='kvm'>
  <name>rhel6</name>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='x86_64' machine='rhel6.5.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/libvirt/images/rhel6.img'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>
  </devices>
</domain>
EOF
Domain rhel6 defined from /dev/stdin

# virsh start rhel6
Domain rhel6 started

2. Create external system checkpoint snapshot
# for i in s1 s2 s3;do virsh snapshot-create-as rhel6 $i --diskspec vda,file=/tmp/$i.disk --memspec file=/tmp/$i.mem;done
Domain snapshot s1 created
Domain snapshot s2 created
Domain snapshot s3 created

3. Do snapshot-revert
# virsh domblklist rhel6
Target     Source
------------------------------------------------
vda        /tmp/s3.disk

#pidof qemu-kvm
3519

# virsh snapshot-revert rhel6 s2
error: revert requires force: Target device address type none does not match source pci

# virsh snapshot-revert rhel6 s2  --force

4. Check guest info

# virsh domblklist rhel6
Target     Source
------------------------------------------------
vda        /tmp/s1.disk

# pidof qemu-kvm
3557


Actual results:

qemu guest restart, and succeed reverting to external system checkpoint snapshot

Expected results:

Revert to external snapshot is not supported now, libvirt should forbid this and don't restart guest and post error like:

error: unsupported configuration: revert to external system checkpoint snapshot not supported yet


Additional info:

Comment 1 Eric Blake 2014-07-30 13:19:34 UTC
Too difficult to attempt for RHEL 6.6. To follow progress in RHEL 7, look at bug 907809

Comment 2 Eric Blake 2014-07-30 13:19:58 UTC

*** This bug has been marked as a duplicate of bug 873285 ***

Comment 5 Eric Blake 2014-07-30 17:37:25 UTC
Reopening and re-titling this bug; similar to what was done in RHEL 7, you have exposed a corner case where libvirt is reverting to a snapshot when it should not be.  Fixed upstream:

commit d410e6f19d944ad78bc9257726d613597db00701
Author: Peter Krempa <pkrempa>
Date:   Tue Mar 4 10:06:22 2014 +0100

    qemu: snapshot: Use better check when reverting external snapshots

    https://bugzilla.redhat.com/show_bug.cgi?id=1071264

    Reverting of external snapshots is not supported currently. The check
    that is present doesn't properly check for all aspects that make a
    snapshot external. Use virDomainSnapshotIsExternal() to do the check.

Comment 6 Jiri Denemark 2014-08-08 13:19:34 UTC
*** Bug 1124317 has been marked as a duplicate of this bug. ***

Comment 8 Jaroslav Suchanek 2015-01-20 08:55:40 UTC
*** Bug 1179532 has been marked as a duplicate of this bug. ***

Comment 11 Shanzhi Yu 2015-01-29 05:28:04 UTC
Verify this bug with libvirt-0.10.2-48.el6.x86_64

Steps as below:

1. Prepare a running guest
# virsh list 
 Id    Name                           State
----------------------------------------------------
 2     rhel6.5                        running


2. Create external system checkpoint snapshot
# virsh snapshot-create-as rhel6.5 s1 --memspec file=/tmp/s1.mem 
Domain snapshot s1 created

3. Do revert
# virsh snapshot-revert 2 s1 
error: unsupported configuration: revert to external snapshot not supported yet

4. Create external disk-only snapshot
# virsh snapshot-create-as 2 s2 --disk-only 
Domain snapshot s2 created

5. Do revert
# virsh snapshot-revert 2 s2 
error: unsupported configuration: revert to external snapshot not supported yet

6. Create internal snapshot
# virsh snapshot-create-as  2 s3  
Domain snapshot s3 created

7. Do revert
# virsh snapshot-revert 2 s3

Comment 13 errata-xmlrpc 2015-07-22 05:46:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1252.html


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