Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Like the following snapshot chain, I used 'snapshot-create' to created snapshot1 & snapshot1.1. But how to create snapshot2, I can't revert to base image by virsh command? If it returns nothing by 'snapshot-current', then it shows that the current is base, if not, that's the snapshot which you created. Once you continue to create snapshots, it's certainly not based on base image.
So the snapshot2 impossibly be created.
base
|
|__snapshot1
| |__snapshot1.1
|
|__snapshot2
Version-Release number of selected component (if applicable):
libvirt-0.8.1-28.el6
qemu-kvm-0.12.1.2-2.123.el6
How reproducible:
Always
Steps to Reproduce:
# virsh snapshot-current rhel6
# virsh snapshot-create rhel6
Domain snapshot 1291880262 created
# virsh snapshot-list rhel6
Name Creation Time State
---------------------------------------------------
1291880262 2010-12-09 02:37:42 -0500 shutoff
# virsh snapshot-current rhel6
<domainsnapshot>
<name>1291880262</name>
<state>shutoff</state>
<creationTime>1291880262</creationTime>
<domain>
<uuid>a35ba4e9-5fbb-3fca-9d6d-9e0dab6e3d32</uuid>
</domain>
</domainsnapshot>
# virsh snapshot-create rhel6
Domain snapshot 1291880301 created
# virsh snapshot-current rhel6
<domainsnapshot>
<name>1291880301</name>
<state>shutoff</state>
<parent>
<name>1291880262</name>
</parent>
<creationTime>1291880301</creationTime>
<domain>
<uuid>a35ba4e9-5fbb-3fca-9d6d-9e0dab6e3d32</uuid>
</domain>
</domainsnapshot>
# virsh snapshot-list rhel6
Name Creation Time State
---------------------------------------------------
1291880262 2010-12-09 02:37:42 -0500 shutoff
1291880301 2010-12-09 02:38:21 -0500 shutoff
Actual results:
Cannot be revert to base image after snapshot created.
Expected results:
Can be revert to base image after snapshot created.
Additional info:
It can workround by restart libvirtd service.
The only bug that I see here is that restarting libvirtd resets current
snapshot (I will create a new BZ for that with clearer problem description).
The bug report is a result of misunderstanding the concept of domain
snapshots. Quoting from virsh man page:
Snapshots take the disk, memory, and device state of a domain at a
point-of-time, and save it for future use. They have many uses, from
saving a "clean" copy of an OS image to saving a domain’s state before a
potentially destructive operation.
That is, a snapshot is an immutable copy of domain state at the time when the
snapshot was created. Just like a photography is an image of a small part of
the world at the time the photography was taken.
Before a snapshot is created, domain's state is a moving target and the main
purpose of the snapshot is to have something one can get back to. So the
first snapshot is what you want to revert to if you need to get the original
pristine state.
Description of problem: Like the following snapshot chain, I used 'snapshot-create' to created snapshot1 & snapshot1.1. But how to create snapshot2, I can't revert to base image by virsh command? If it returns nothing by 'snapshot-current', then it shows that the current is base, if not, that's the snapshot which you created. Once you continue to create snapshots, it's certainly not based on base image. So the snapshot2 impossibly be created. base | |__snapshot1 | |__snapshot1.1 | |__snapshot2 Version-Release number of selected component (if applicable): libvirt-0.8.1-28.el6 qemu-kvm-0.12.1.2-2.123.el6 How reproducible: Always Steps to Reproduce: # virsh snapshot-current rhel6 # virsh snapshot-create rhel6 Domain snapshot 1291880262 created # virsh snapshot-list rhel6 Name Creation Time State --------------------------------------------------- 1291880262 2010-12-09 02:37:42 -0500 shutoff # virsh snapshot-current rhel6 <domainsnapshot> <name>1291880262</name> <state>shutoff</state> <creationTime>1291880262</creationTime> <domain> <uuid>a35ba4e9-5fbb-3fca-9d6d-9e0dab6e3d32</uuid> </domain> </domainsnapshot> # virsh snapshot-create rhel6 Domain snapshot 1291880301 created # virsh snapshot-current rhel6 <domainsnapshot> <name>1291880301</name> <state>shutoff</state> <parent> <name>1291880262</name> </parent> <creationTime>1291880301</creationTime> <domain> <uuid>a35ba4e9-5fbb-3fca-9d6d-9e0dab6e3d32</uuid> </domain> </domainsnapshot> # virsh snapshot-list rhel6 Name Creation Time State --------------------------------------------------- 1291880262 2010-12-09 02:37:42 -0500 shutoff 1291880301 2010-12-09 02:38:21 -0500 shutoff Actual results: Cannot be revert to base image after snapshot created. Expected results: Can be revert to base image after snapshot created. Additional info: It can workround by restart libvirtd service.