Bug 1733173 - Can't revert the domain to the special snapshot
Summary: Can't revert the domain to the special snapshot
Keywords:
Status: CLOSED DUPLICATE of bug 880565
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.1
Assignee: Peter Krempa
QA Contact: yisun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-25 10:23 UTC by Meina Li
Modified: 2020-09-22 06:50 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-17 18:05:51 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Meina Li 2019-07-25 10:23:53 UTC
Description of problem:
Can't revert the domain to the special snapshot

Version-Release number of selected component (if applicable):
libvirt-5.5.0-1.module+el8.1.0+3580+d7f6488d.x86_64
kernel-4.18.0-107.el8.x86_64
qemu-kvm-4.0.0-5.module+el8.1.0+3622+5812d9bf.x86_64

How reproducible:
100%

Steps to Reproduce:

1. Prepare a running domain lmn.

2. Create the following snapshot.

# virsh snapshot-create-as lmn snap1
Domain snapshot snap1 created

# virsh snapshot-create-as lmn snap2
Domain snapshot snap2 created

# virsh snapshot-create-as lmn snap3 --disk-only
Domain snapshot snap3 created

# virsh snapshot-list lmn 
 Name         Creation Time               State
---------------------------------------------------------
 snap1   2019-07-25 05:44:03 -0400   running
 snap2   2019-07-25 05:44:15 -0400   running
 snap3   2019-07-25 05:44:55 -0400   disk-snapshot

3. Revert the domain to snap1.
# virsh snapshot-revert lmn snap1
error: operation failed: Failed to load snapshot: Error: Device 'drive-virtio-disk0' does not have the requested snapshot 'snap1'

Actual results:
Can't revert the domain to the special snapshot

Expected results:
Should revert the domain to the special snapshot successfully

Additional info:

Comment 1 Peter Krempa 2020-03-17 18:05:51 UTC

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

Comment 2 Han Han 2020-09-22 03:41:38 UTC
Hello, the problem is reproduced on latest libvirt but the error is different
Version:
libvirt-6.6.0-6.module+el8.3.0+8125+aefcf088.x86_64
qemu-kvm-5.1.0-9.module+el8.3.0+8182+ac9ced32.x86_64

Steps:
➜  ~ virsh list
 Id   Name   State
----------------------
 1    new    running
➜  ~ virsh snapshot-create-as 1 s1
Domain snapshot s1 created
➜  ~ virsh snapshot-create-as 1 s2 --disk-only 
Domain snapshot s2 created
➜  ~ virsh snapshot-revert 1 s1
 error: operation failed: Failed to load snapshot: Error: Device '' does not have the requested snapshot 's1'
➜  ~ virsh snapshot-list 1
 Name   Creation Time               State
---------------------------------------------------
 s1     2020-09-21 23:22:43 -0400   running
 s2     2020-09-21 23:22:53 -0400   disk-snapshot

The domain xml: http://paste.openstack.org/raw/798187/
The libvirtd log: http://paste.openstack.org/raw/798188/

Is it a valid scenario to use the internal and external snapshots together? If not, could you please provide a short explanation?

Comment 3 Peter Krempa 2020-09-22 06:50:50 UTC
It semantically may make sense but there are problems in the current implementation.


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