Bug 605543 - virsh pool-list and vol-list commands could be improved to show more details
virsh pool-list and vol-list commands could be improved to show more details
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: 6.1
Assigned To: Eric Blake
Virtualization Bugs
:
Depends On: 602217
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-18 04:29 EDT by Justin Clift
Modified: 2011-05-19 09:19 EDT (History)
6 users (show)

See Also:
Fixed In Version: libvirt-0.8.6-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-19 09:19:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Justin Clift 2010-06-18 04:29:21 EDT
Description of problem:

At present when using virsh, the only (non-XML) way to retrieve pool and volume usage information is with the pool-info and vol-info commands.

These commands are functional, but only display information for only one pool or volume at a time, making them impractical for use when dealing with hundreds of volumes.

A patch for fixing this has been submitted upstream:

  http://www.redhat.com/archives/libvir-list/2010-June/msg00458.html

Existing output of pool-list:

  virsh # pool-list
  Name                 State      Autostart 
  -----------------------------------------
  default              active     yes       
  image_dir            active     yes       

  virsh # pool-list --all
  Name                 State      Autostart 
  -----------------------------------------
  default              active     yes       
  image_dir            active     yes       
  tmp                  inactive   no

New output of pool-list, using --details option:

  virsh # pool-list --details
  Name                 State      Autostart  Persistent  Capacity  Allocation  Available 
  --------------------------------------------------------------------------------------
  default              running    yes        yes         1.79 TB   1.47 TB     326.02 GB 
  image_dir            running    yes        yes         1.79 TB   1.47 TB     326.02 GB 

  virsh # pool-list --all --details
  Name                 State      Autostart  Persistent  Capacity  Allocation  Available 
  --------------------------------------------------------------------------------------
  default              running    yes        yes         1.79 TB   1.47 TB     326.02 GB 
  image_dir            running    yes        yes         1.79 TB   1.47 TB     326.02 GB 
  tmp                  inactive   no         yes         -         -           -         

  virsh #

Existing output of vol-list:

  virsh # vol-list default
  Name                 Path
  -----------------------------------------
  CentOS-5.5-x86_64-bin-DVD-1of2.iso /var/lib/libvirt/images/CentOS-5.5-x86_64-bin-DVD-1of2.iso
  CentOS-5.5-x86_64-bin-DVD-2of2.iso /var/lib/libvirt/images/CentOS-5.5-x86_64-bin-DVD-2of2.iso

  virsh # vol-list tmp
  Name                 Path
  -----------------------------------------
  disk1.img            /tmp/images/disk1.img
  disk2.img            /tmp/images/disk2.img
  disk3.img            /tmp/images/disk3.img
  disk4.img            /tmp/images/disk4.img
  disk5.img            /tmp/images/disk5.img
  disk6.img            /tmp/images/disk6.img

  virsh #


New output of vol-list, using --details option:

  virsh # vol-list default --details
  Name                                Path                                                        Type  Capacity   Allocation
  ---------------------------------------------------------------------------------------------------------------------------
  CentOS-5.5-x86_64-bin-DVD-1of2.iso  /var/lib/libvirt/images/CentOS-5.5-x86_64-bin-DVD-1of2.iso  file  4.09 GB    4.10 GB
  CentOS-5.5-x86_64-bin-DVD-2of2.iso  /var/lib/libvirt/images/CentOS-5.5-x86_64-bin-DVD-2of2.iso  file  412.33 MB  412.74 MB

  virsh # vol-list tmp --details
  Name       Path                   Type  Capacity  Allocation
  ------------------------------------------------------------
  disk1.img  /tmp/images/disk1.img  file  20.00 GB  136.00 KB
  disk2.img  /tmp/images/disk2.img  file  20.00 GB  136.00 KB
  disk3.img  /tmp/images/disk3.img  file  20.00 GB  136.00 KB
  disk4.img  /tmp/images/disk4.img  file  20.00 GB  136.00 KB
  disk5.img  /tmp/images/disk5.img  file  20.00 GB  136.00 KB
  disk6.img  /tmp/images/disk6.img  file  20.00 GB  136.00 KB

  virsh #


Version-Release number of selected component (if applicable):

libvirt-0.7.6-2.el6.x86_64.rpm
Comment 3 RHEL Product and Program Management 2010-06-18 04:55:00 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 5 Eric Blake 2010-06-29 12:28:01 EDT
This will not be applied for RHEL 6.0 (the information can be obtained through other virsh commands, so this was just an RFE), but it is reasonable to include for 6.1.
Comment 7 Jiri Denemark 2010-12-23 18:48:15 EST
Fixed by a rebase to libvirt-0.8.6
Comment 9 Nan Zhang 2010-12-24 03:52:09 EST
Verified with the following build, the execution result is as expected. Moving it to VERIFIED.

kernel-2.6.32-92.el6.x86_64
qemu-kvm-0.12.1.2-2.128.el6.x86_64
libvirt-0.8.6-1.el6.x86_64


# virsh pool-list --details
Name     State    Autostart  Persistent  Capacity  Allocation  Available
------------------------------------------------------------------------
default  running  yes        yes         36.67 GB    11.19 GB   25.48 GB

# virsh pool-list --all --details
Name       State    Autostart  Persistent  Capacity  Allocation  Available
--------------------------------------------------------------------------
default    running  yes        yes         36.67 GB    11.19 GB   25.48 GB
pool-test  running  yes        yes         36.67 GB    11.19 GB   25.48 GB

# virsh vol-list default --details
Name             Path                                     Type  Capacity  Allocation
------------------------------------------------------------------------------------
rhel5u5.img      /var/lib/libvirt/images/rhel5u5.img      file   8.00 GB     3.30 GB
rhel6-new.qcow2  /var/lib/libvirt/images/rhel6-new.qcow2  file   3.81 GB   140.00 KB
rhel6.img        /var/lib/libvirt/images/rhel6.img        file   8.00 GB     1.62 GB
rhel6.qcow2      /var/lib/libvirt/images/rhel6.qcow2      file   6.00 GB     1.30 GB
winxp.img        /var/lib/libvirt/images/winxp.img        file   8.00 GB     1.60 GB
Comment 13 errata-xmlrpc 2011-05-19 09:19:14 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0596.html

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