Red Hat Bugzilla – Bug 810799
virsh list and "--managed-save " flag can't list the domains with managed save state
Last modified: 2013-02-21 02:11:40 EST
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:
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.
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?
Just clarify the documentation IMHO
Added documentation about the usage of --managed-save upstream: commit cc5100654b2aff0933ab4aa447a71bfd7ddbf2bd Author: Peter Krempa <pkrempa@redhat.com> 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.
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.
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