Hide Forgot
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.
In POST: http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-September/msg00080.html
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