Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 876817 - virsh should make it easier to filter snapshots by type
virsh should make it easier to filter snapshots by type
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Eric Blake
Virtualization Bugs
:
Depends On: 638512 874171
Blocks: 881827
  Show dependency treegraph
 
Reported: 2012-11-14 22:28 EST by Eric Blake
Modified: 2013-02-21 02:26 EST (History)
9 users (show)

See Also:
Fixed In Version: libvirt-0.10.2-10.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 874171
Environment:
Last Closed: 2013-02-21 02:26:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 16:18:26 EST

  None (edit)
Comment 1 Eric Blake 2012-11-14 22:30:16 EST
As we add more snapshot capabilities, it becomes more important to have 'virsh snapshot-info' tell details about whether a snapshot is internal or external, and to have 'virsh snapshot-list' gain new filtering flags (such as --external) to quickly see which snapshots have which properties.  This will involve backporting this upstream series:
https://www.redhat.com/archives/libvir-list/2012-November/msg00688.html
Comment 5 Huang Wenlong 2012-11-27 04:35:04 EST
verify this bug with :
libvirt-0.10.2-10.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.337.el6.x86_64


1) start qcow2 domain then 
 
[root@intel-q9400-4-7 ~]# virsh snapshot-create-as bug active-internal
Domain snapshot active-internal created
[root@intel-q9400-4-7 ~]# virsh snapshot-create-as bug active-external --memspec /tmp/bug
Domain snapshot active-external created
[root@intel-q9400-4-7 ~]# virsh snapshot-create-as bug active-disk-only --disk-only
Domain snapshot active-disk-only created

2) destroy domain then 
[root@intel-q9400-4-7 ~]# virsh snapshot-create-as bug inactive-disk-only --disk-only
Domain snapshot inactive-disk-only created
[root@intel-q9400-4-7 ~]# virsh snapshot-create-as bug inactive-internal
Domain snapshot inactive-internal created

3) check snapshot-list 


# virsh snapshot-list bug
 Name                 Creation Time             State
------------------------------------------------------------
 active-disk-only     2012-11-27 17:24:11 +0800 disk-snapshot
 active-external      2012-11-27 17:23:59 +0800 running
 active-internal      2012-11-27 17:22:26 +0800 running
 inactive-disk-only   2012-11-27 17:24:57 +0800 shutoff
 inactive-internal    2012-11-27 17:25:06 +0800 shutoff

[root@intel-q9400-4-7 ~]# virsh snapshot-list bug --active 
 Name                 Creation Time             State
------------------------------------------------------------
 active-external      2012-11-27 17:23:59 +0800 running
 active-internal      2012-11-27 17:22:26 +0800 running

[root@intel-q9400-4-7 ~]# virsh snapshot-list bug --inactive 
 Name                 Creation Time             State
------------------------------------------------------------
 inactive-disk-only   2012-11-27 17:24:57 +0800 shutoff
 inactive-internal    2012-11-27 17:25:06 +0800 shutoff

[root@intel-q9400-4-7 ~]# virsh snapshot-list bug --external
 Name                 Creation Time             State
------------------------------------------------------------
 active-disk-only     2012-11-27 17:24:11 +0800 disk-snapshot
 active-external      2012-11-27 17:23:59 +0800 running
 inactive-disk-only   2012-11-27 17:24:57 +0800 shutoff

[root@intel-q9400-4-7 ~]# virsh snapshot-list bug --internal
 Name                 Creation Time             State
------------------------------------------------------------
 active-internal      2012-11-27 17:22:26 +0800 running
 inactive-internal    2012-11-27 17:25:06 +0800 shutoff

[root@intel-q9400-4-7 ~]# virsh snapshot-list bug --disk-only
 Name                 Creation Time             State
------------------------------------------------------------
 active-disk-only     2012-11-27 17:24:11 +0800 disk-snapshot
[root@intel-q9400-4-7 ~]# virsh snapshot-list bug --active --inactive 
 Name                 Creation Time             State
------------------------------------------------------------
 active-external      2012-11-27 17:23:59 +0800 running
 active-internal      2012-11-27 17:22:26 +0800 running
 inactive-disk-only   2012-11-27 17:24:57 +0800 shutoff
 inactive-internal    2012-11-27 17:25:06 +0800 shutoff

[root@intel-q9400-4-7 ~]# virsh snapshot-list bug --active --disk-only
 Name                 Creation Time             State
------------------------------------------------------------
 active-disk-only     2012-11-27 17:24:11 +0800 disk-snapshot
 active-external      2012-11-27 17:23:59 +0800 running
 active-internal      2012-11-27 17:22:26 +0800 running

[root@intel-q9400-4-7 ~]# virsh snapshot-list bug --active --internal
 Name                 Creation Time             State
------------------------------------------------------------
 active-internal      2012-11-27 17:22:26 +0800 running

[root@intel-q9400-4-7 ~]# virsh snapshot-list bug --active --external
 Name                 Creation Time             State
------------------------------------------------------------
 active-external      2012-11-27 17:23:59 +0800 running

[root@intel-q9400-4-7 ~]# virsh snapshot-list bug --inactive --disk-only
 Name                 Creation Time             State
------------------------------------------------------------
 active-disk-only     2012-11-27 17:24:11 +0800 disk-snapshot
 inactive-disk-only   2012-11-27 17:24:57 +0800 shutoff
 inactive-internal    2012-11-27 17:25:06 +0800 shutoff

[root@intel-q9400-4-7 ~]# virsh snapshot-list bug --inactive --internal
 Name                 Creation Time             State
------------------------------------------------------------
 inactive-internal    2012-11-27 17:25:06 +0800 shutoff

[root@intel-q9400-4-7 ~]# virsh snapshot-list bug --inactive --external
 Name                 Creation Time             State
------------------------------------------------------------
 inactive-disk-only   2012-11-27 17:24:57 +0800 shutoff
Comment 6 Huang Wenlong 2012-11-27 04:36:08 EST
add some cases : 

[root@intel-q9400-4-7 ~]# virsh snapshot-list bug --disk-only --internal
 Name                 Creation Time             State
------------------------------------------------------------

[root@intel-q9400-4-7 ~]# virsh snapshot-list bug --disk-only --external
 Name                 Creation Time             State
------------------------------------------------------------
 active-disk-only     2012-11-27 17:24:11 +0800 disk-snapshot

[root@intel-q9400-4-7 ~]# virsh snapshot-list bug --internal --external
 Name                 Creation Time             State
------------------------------------------------------------
 active-disk-only     2012-11-27 17:24:11 +0800 disk-snapshot
 active-external      2012-11-27 17:23:59 +0800 running
 active-internal      2012-11-27 17:22:26 +0800 running
 inactive-disk-only   2012-11-27 17:24:57 +0800 shutoff
 inactive-internal    2012-11-27 17:25:06 +0800 shutoff
Comment 7 errata-xmlrpc 2013-02-21 02:26:38 EST
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/RHSA-2013-0276.html

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