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.