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 1175123 - Inactive external snapshot can't work after libvirtd restart
Summary: Inactive external snapshot can't work after libvirtd restart
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1175147
TreeView+ depends on / blocked
 
Reported: 2014-12-17 08:40 UTC by Shanzhi Yu
Modified: 2015-11-19 05:59 UTC (History)
6 users (show)

Fixed In Version: libvirt-1.2.13-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1175147 (view as bug list)
Environment:
Last Closed: 2015-11-19 05:59:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Shanzhi Yu 2014-12-17 08:40:09 UTC
Description of problem:

Inactive external snapshot can't work after libvirtd restart

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

libvirt-1.2.8-10.el7.x86_64

How reproducible:

100%

Steps to Reproduce:
1.Prepare a shut off guest 
# virsh list --inactive 
 Id    Name                           State
----------------------------------------------------
 -     rhel7                          shut off

2.Create external snapshot for shot off guest

# virsh snapshot-create-as rhel7 ss --disk-only 
Domain snapshot ss created

3.Check guest source file

# virsh dumpxml rhel7|grep "source file"
      <source file='/var/lib/libvirt/images/rhel7-qcow2v3.ss'/>

4.Restart libvirt, do check in step 3 again

# systemctl restart  libvirtd.service

# virsh dumpxml rhel7|grep "source file" 
      <source file='/var/lib/libvirt/images/rhel7-qcow2v3.img'/>

Actual results:


Expected results:

source file should point to new snapshot file in step 4

Additional info:

This was first reported by Eric Blake
http://www.redhat.com/archives/libvir-list/2014-December/msg00369.html

Comment 1 Shanzhi Yu 2015-01-15 10:19:57 UTC
Upstream patch:

commit 9f974858dde667bda55fbfbec56aa16d9ced870d
Author: Shanzhi Yu <shyu>
Date:   Sun Dec 7 00:32:18 2014 +0800

    qemu: snapshot: inactive external snapshot can't work after libvirtd restart
    
    When create inactive external snapshot, after update disk definitions,
    virDomainSaveConfig is needed, if not after restart libvirtd the new snapshot
    file definitions in xml will be lost.
    
https://www.redhat.com/archives/libvir-list/2015-January/msg00435.html

Comment 3 Yang Yang 2015-04-29 03:40:14 UTC
Verified on libvirt-1.2.14-1.el7.x86_64

# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     testvm3                        shut off

# virsh domblklist testvm3
Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/vm1.qcow2

# virsh snapshot-create-as testvm3 s1 --disk-only
Domain snapshot s1 created

# virsh domblklist testvm3
Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/vm1.s1

# service libvirtd restart

# virsh domblklist testvm3
Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/vm1.s1

# virsh snapshot-create-as testvm3 s2 --disk-only --no-metadata
Domain snapshot s2 created

# virsh domblklist testvm3
Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/vm1.s2

# service libvirtd restart
Redirecting to /bin/systemctl restart  libvirtd.service

# virsh domblklist testvm3
Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/vm1.s2

Comment 5 Yang Yang 2015-05-18 03:30:17 UTC
According to comment #3, mark it as verified

Comment 7 errata-xmlrpc 2015-11-19 05:59:11 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-2202.html


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