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.
Bug 810799 - virsh list and "--managed-save " flag can't list the domains with managed save state
Summary: virsh list and "--managed-save " flag can't list the domains with managed sav...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-09 08:32 UTC by hongming
Modified: 2013-02-21 07:11 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.9.13-3.el6
Doc Type: Bug Fix
Doc Text:
Feature bug fix.
Clone Of:
Environment:
Last Closed: 2013-02-21 07:11:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description hongming 2012-04-09 08:32:51 UTC
Description of problem:
virsh list and "--managed-save " flag can't list the domains with managed save state.

Version-Release number of selected component (if applicable):
kernel-2.6.32-250.el6.x86_64
libvirt-0.9.10-10.el6.x86_64
qemu-kvm-0.12.1.2-2.270.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Managed save one domain
# virsh managedsave rhel6u32
Domain rhel6u32 state saved by libvirt

2. List domains with managed save state.
# virsh list --managed-save
Id Name             State
----------------------------------------------------
18 winxp-x86_64     running


3. # virsh list --managed-save --all
Id  Name             State
----------------------------------------------------
18 winxp-x86_64      running
- kvm-rhel3u9-i386   shut off
- rhel6u32           saved


  
Actual results:
virsh list and "--managed-save" flag can't list the domains with managed save state. It only list running domains. If use "--managed-save --all" flag , the domains with managed save states can be listed.

Expected results:
virsh list and "--managed-save " flag can list the domains with managed save state.

Additional info:

Comment 2 dyuan 2012-04-09 09:04:05 UTC
It's not very clear for the --managed-save option in "virsh help".

# virsh help list

--managed-save   mark domains with managed save state


# man virsh 

If --managed-save is specified, then domains that have managed save state (only possible if they are in the shut off state) will instead show as saved in the listing. This flag is usable only with the default --table output.

# virsh list --table --manged-save

only list the running domains.

Comment 3 Peter Krempa 2012-04-10 09:53:49 UTC
We could modify the semantics of the --managed-save flag, that would automaticaly imply listing inactive domains when it's specified or just document that you need to specify --all or --inactive to produce useful results.

What would be the preferred approach?

Comment 4 Daniel Berrangé 2012-04-10 10:00:37 UTC
Just clarify the documentation IMHO

Comment 5 Peter Krempa 2012-04-10 13:57:09 UTC
Added documentation about the usage of --managed-save upstream:

commit cc5100654b2aff0933ab4aa447a71bfd7ddbf2bd
Author: Peter Krempa <pkrempa>
Date:   Tue Apr 10 12:21:03 2012 +0200

    virsh: Clarify use of the --managed-save flag for the list command
    
    The documentation for the flag doesn't clearly state that the flag only
    enhances the output and the user needs to specify other flags to list
    inactive domains, that are enhanced by this flag.

Comment 8 hongming 2012-07-25 07:23:10 UTC
Verify it using the following version.

libvirt-0.9.13-3.el6.x86_64


Steps

# man virsh 

 If --managed-save is specified, then domains that have managed
 save state (only possible if they are in the shut off state, so
 you need to specify --inactive or --all to actually list them)
 will instead show as saved in the listing. This flag is usable
 only with the default --table output.  Note that this flag does
 not filter the list of domains.


The result is expected. So move its status to VERIFIED.

Comment 9 errata-xmlrpc 2013-02-21 07:11:40 UTC
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.