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:
snapshots are difficult to manipulate in virsh. Some of the fixes require upstream additions (either new flags to existing commands, or new APIs altogether) which cannot be backported, but for the most part, there are a lot of useful upstream features that belong in RHEL 6 alongside the improved snapshot support for bug 638510. Also, backporting earlier virsh features will make backporting later virsh features easier, rather than facing conflict resolution when backporting just those later features
Version-Release number of selected component (if applicable):
libvirt-0.9.6-7.el6
How reproducible:
100%
Steps to Reproduce:
1. figure out the name of the current snapshot using shell code
2. figure out the name of a snapshot's parent using shell code
3. try to send a multi-word qemu monitor command, such as 'info block'
4. try to undefine an active domain, to see what happens to snapshots
5. etc.
Actual results:
1. Not easy - 'virsh snapshot-current dom' dumps the entire xml, which you then have to parse
2. Not easy - nothing dumps the name of a snapshot's parent except 'virsh snapshot-dumpxml dom name', which you then have to parse
3. Not easy - requires extra shell quoting: virsh qemu-monitor-command dom --hmp 'info block'
4. Not possible - even though the API allows this transition, 'virsh undefine' forbids it without trying the API
Expected results:
1. 'virsh snapshot-current dom --name' is a nice addition
2. 'virsh snapshot-parent dom' is a nice addition, as is 'virsh snapshot-list --parent'
3. 'virsh qemu-monitor-command dom --hmp info block' is a nice addition
4. 'virsh undefine' no longer gets in the way of APIs
5. probably several others - I plan to use this BZ to scrape in all prerequisite virsh patches so that my snapshot series no longer has merge conflicts.
Additional info:
Getting this fixed is a prereq to bug 638510 support for live snapshots via the
snapshot_blkdev qemu monitor command.
It will make testing the various other patches easier, as well as avoiding merge conflicts which makes the code easier to maintain. It is also well-isolated to virsh, without most patches not even touching libvirtd proper.
Tested with libvirt-0.9.4-11.el6.x86_64, move this to VERIFIED.
1. # virsh snapshot-current rhel6 --name
s4
2. # virsh snapshot-parent rhel6 s4
s3
3. # virsh qemu-monitor-command rhel6 --hmp info block
drive-virtio-disk0: type=hd removable=0 file=/var/lib/libvirt/images/rhel6.img ro=0 drv=qcow2 encrypted=0
4. # virsh list
Id Name State
----------------------------------
1 rhel6 running
# virsh undefine rhel6
Domain rhel6 has been undefined
# virsh list
Id Name State
----------------------------------
1 rhel6 running
# virsh destroy rhel6
Domain rhel6 destroyed
# virsh list --all
Id Name State
----------------------------------
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.
http://rhn.redhat.com/errata/RHBA-2011-1513.html