Bug 2043584

Summary: Snapshot-revert failed with 'cause is unknown' error
Product: Red Hat Enterprise Linux 8 Reporter: Ján Tomko <jtomko>
Component: libvirtAssignee: Ján Tomko <jtomko>
Status: CLOSED ERRATA QA Contact: liang cong <lcong>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.6CC: jdenemar, jtomko, lcong, lmen, virt-maint, xuzhang, yanqzhan, yisun
Target Milestone: rcKeywords: Regression, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-8.0.0-2.module+el8.6.0+14025+ca131e0a Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2039136 Environment:
Last Closed: 2022-05-10 13:25:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version: 8.1.0
Embargoed:
Bug Depends On: 2039136    
Bug Blocks:    

Description Ján Tomko 2022-01-21 15:06:40 UTC
+++ This bug was initially created as a clone of Bug #2039136 +++

Description of problem:
 Snapshot-revert failed with 'cause is unknown' error

Version-Release number of selected component (if applicable):
libvirt-8.0.0-0rc1.1.el9.x86_64
qemu-kvm-6.2.0-3.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a shutoff domain
# virsh snapshot-create-as vm  s1
Domain snapshot s1 created

2.# virsh edit vm  (e.g. remove rng device in xml)
Domain 'vm' XML configuration edited.

3.# virsh snapshot-create-as vm  s2
Domain snapshot s2 created

4. # virsh snapshot-revert vm s1
error: An error occurred, but the cause is unknown

Actual results:


Expected results:
Should succeed

Additional info:
Not reproduced in libvirt-7.10.0-1.el9.x86_64

--- Additional comment from Ján Tomko on 2022-01-20 15:18:26 CET ---

Fixed upstream by:
commit 76deb656132bb8817ddae4b7f417930c4db824c9
Author:     Ján Tomko <jtomko>
CommitDate: 2022-01-20 15:16:18 +0100

    qemu: fix inactive snapshot revert

git describe: v8.0.0-124-g76deb65613

Comment 2 liang cong 2022-01-25 05:35:16 UTC
Preverify on:
libvirt: v8.0.0-130-g2b7f9506b1
qemu-6.2.0-2.fc36.x86_64
qemu-kvm-6.2.0-2.fc36.x86_64

preverify info pls refer to https://bugzilla.redhat.com/show_bug.cgi?id=2039136

Comment 5 liang cong 2022-01-28 08:35:53 UTC
Verified on libvirt-8.0.0-2.module+el8.6.0+14025+ca131e0a.x86_64

# rpm -q libvirt qemu-kvm
libvirt-8.0.0-2.module+el8.6.0+14025+ca131e0a.x86_64
qemu-kvm-6.2.0-5.module+el8.6.0+14025+ca131e0a.x86_64

# virsh list --inactive
 Id   Name         State
-----------------------------
 -    qcow2_test   shut off

# virsh snapshot-create-as qcow2_test s1
Domain snapshot s1 created

# virsh edit vm1
error: failed to get domain 'vm1'

# virsh edit qcow2_test
Domain 'qcow2_test' XML configuration edited.

# virsh snapshot-create-as qcow2_test s2
Domain snapshot s2 created

# virsh snapshot-revert qcow2_test s1


# virsh start qcow2_test
Domain 'qcow2_test' started

# virsh snapshot-revert qcow2_test s2

Comment 7 errata-xmlrpc 2022-05-10 13:25:20 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 (Moderate: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update), 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://access.redhat.com/errata/RHSA-2022:1759