Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 602217

Summary: add virsh vol-pool command
Product: Red Hat Enterprise Linux 6 Reporter: Eric Blake <eblake>
Component: libvirtAssignee: Eric Blake <eblake>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: dallan, hbrock, mjenner, nzhang, syeghiay, xen-maint, yoyzhang
Target Milestone: rc   
Target Release: 6.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0_8_1-9_el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-11 14:50:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 600640, 605543    
Attachments:
Description Flags
upstream patch none

Description Eric Blake 2010-06-09 12:25:04 UTC
Description of problem:
The virsh interface allows easy conversion from a volume name and pool id to a volume uuid or volume path, but the conversion is one-way.  libvirtd already provides the interfaces for the reverse direction, from a volume uuid or path back to its containing pool, but virsh does not expose this.


Version-Release number of selected component (if applicable):
libvirtd-0.8.1-7.el6.x86_64

How reproducible:
Always


Steps to Reproduce:
1. virsh vol-create default image.xml # where image.xml describes path/to/image.img
2. virsh vol-pool path/to/image.img
  
Actual results:
unrecognized command - to image.img, you have to already know that it belongs to the pool 'default'

Expected results:
print 'default', since libvirtd can compute the reverse mapping from any path back to the storage pool that would contain it

Additional info:

Comment 1 RHEL Program Management 2010-06-09 12:33:29 UTC
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 2 Eric Blake 2010-06-09 12:44:54 UTC
Created attachment 422533 [details]
upstream patch

Comment 4 Dave Allan 2010-06-16 20:49:30 UTC
libvirt-0_8_1-9_el6 has been built in RHEL-6-candidate with the fix.

Dave

Comment 5 Eric Blake 2010-06-18 20:52:01 UTC
Any further improvements to vol-pool will be tracked through subsequent BZ, such as bug#605543

Comment 8 Nan Zhang 2010-09-09 10:33:05 UTC
Verified with libvirt-0.8.1-27.el6.x86_64 & qemu-kvm-0.12.1.2-2.113.el6.x86_64.

# virsh vol-list --pool default
Name                 Path                                    
-----------------------------------------
fd.img               /var/lib/libvirt/images/fd.img          
rhel6.img            /var/lib/libvirt/images/rhel6.img

# virsh vol-pool /var/lib/libvirt/images/rhel6.img 
default

Comment 9 releng-rhel@redhat.com 2010-11-11 14:50:01 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.