Description of problem: Version-Release number of selected component (if applicable): How reproducible: [root@dhcp-66-70-18 ~]# cat pool.xml <pool type='netfs'> <name>nfspool</name> <uuid>9f5a6a81-ede9-1874-b0aa-ff4227165d75</uuid> <capacity>0</capacity> <allocation>0</allocation> <available>0</available> <source> <host name='10.66.71.226'/> <dir path='/vol/libvirt1/auto'/> <format type='auto'/> </source> <target> <path>/var/lib/xen/images</path> <permissions> <mode>0700</mode> <owner>0</owner> <group>0</group> </permissions> </target> </pool> [root@dhcp-66-70-18 ~]# cat vol.xml <volume> <name>virtimage</name> <key>/var/lib/xen/images/virtimage</key> <source> </source> <capacity>10737418240</capacity> <allocation>2210500608</allocation> <target> <path>/var/lib/xen/images/virtimage</path> <format type='raw'/> <permissions> <mode>0600</mode> <owner>0</owner> <group>0</group> <label>system_u:object_r:nfs_t</label> </permissions> </target> </volume> [root@dhcp-66-70-18 ~]# virsh pool-define pool.xml Pool nfspool defined from pool.xml [root@dhcp-66-70-18 ~]# virsh pool-start nfspool Pool nfspool started [root@dhcp-66-70-18 ~]# virsh vol-create nfspool vol.xml Vol virtimage created from vol.xml [root@dhcp-66-70-18 ~]# virsh pool-list Name State Autostart ----------------------------------------- default active yes nfspool active no [root@dhcp-66-70-18 ~]# virsh vol-list nfspool Name Path ----------------------------------------- virtimage /var/lib/xen/images/virtimage [root@dhcp-66-70-18 ~]# virsh vol-path virtimage error: failed to get vol 'virtimage' error: invalid storage volume pointer in no storage vol with matching path [root@dhcp-66-70-18 ~]# virsh vol-path /var/lib/xen/images/virtimage /var/lib/xen/images/virtimage [root@dhcp-66-70-18 ~]# virsh vol-delete virtimage error: failed to get vol 'virtimage' error: invalid storage volume pointer in no storage vol with matching path [root@dhcp-66-70-18 ~]# virsh vol-delete /var/lib/xen/images/virtimage Vol /var/lib/xen/images/virtimage deleted Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: [root@dhcp-66-70-18 ~]# virsh help vol-path NAME vol-path - convert a vol UUID to vol path SYNOPSIS vol-path [--pool <string>] <vol> OPTIONS --pool <string> pool name or uuid <vol> vol name or key [root@dhcp-66-70-18 ~]# virsh help vol-delete NAME vol-delete - delete a vol SYNOPSIS vol-delete [--pool <string>] <vol> DESCRIPTION Delete a given vol. OPTIONS --pool <string> pool name or uuid <vol> vol name, key or path [root@dhcp-66-70-18 ~]# virsh -h|grep vol vol-create create a vol from an XML file vol-create-as create a volume from a set of args vol-delete delete a vol vol-dumpxml vol information in XML vol-info storage vol information vol-list list vols vol-path convert a vol UUID to vol path vol-name convert a vol UUID to vol name vol-key convert a vol UUID to vol key In addition: in the above,"convert a vol UUID to vol .." notes seems incorrect,and it should be that "convert vol name or key to vol path".
[root@dhcp-66-70-18 ~]# uname -a Linux dhcp-66-70-18.nay.redhat.com 2.6.18-156.el5xen #1 SMP Mon Jun 29 18:24:43 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux [root@dhcp-66-70-18 ~]# rpm -qa|grep libvirt libvirt-0.6.3-13.el5 libvirt-debuginfo-0.6.3-12.el5 libvirt-python-0.6.3-13.el5 libvirt-devel-0.6.3-13.el5
virsh vol-delete commands support "name" parameter,we need to add "pool" optons such as: [root@dhcp-66-70-18 ~]# virsh vol-delete --pool nfspool virtimage Vol virtimage deleted
I don't think this should go into 5.4 at this point in the release.
Patch posted upstream at: https://www.redhat.com/archives/libvir-list/2009-December/msg00278.html applies cleanly. RHEL5.5 behavior is identical to upstream head.
libvirt-0.6.3-25.el5 has been built in dist-5E-qu-candidate with the fix, Daniel
1. [root@dhcp-66-70-91 xml]# virsh vol-list nfspool Name Path ----------------------------------------- fedora11.img /var/lib/libvirt/images/fedora11.img rhel5u4_x86_64_kvm.img /var/lib/libvirt/images/rhel5u4_x86_64_kvm.img virtimage /var/lib/libvirt/images/virtimage 2. [root@dhcp-66-70-91 xml]# virsh help vol-path NAME vol-path - convert a vol UUID to vol path SYNOPSIS vol-path [--pool <string>] <vol> OPTIONS --pool <string> pool name or uuid <vol> vol name or key 3. [root@dhcp-66-70-91 xml]# virsh vol-path virtimage error: failed to get vol 'virtimage' error: invalid storage volume pointer in no storage vol with matching path 4. [root@dhcp-66-70-91 xml]# virsh help vol-delete NAME vol-delete - delete a vol SYNOPSIS vol-delete [--pool <string>] <vol> DESCRIPTION Delete a given vol. OPTIONS --pool <string> pool name or uuid <vol> vol name, key or path 5. [root@dhcp-66-70-91 xml]# virsh vol-delete virtimage error: failed to get vol 'virtimage' error: invalid storage volume pointer in no storage vol with matching path Additional information: [root@dhcp-66-70-91 xml]# uname -a Linux dhcp-66-70-91.nay.redhat.com 2.6.18-164.el5xen #1 SMP Tue Aug 18 15:59:52 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux [root@dhcp-66-70-91 xml]# rpm -qa|grep libvirt libvirt-debuginfo-0.6.3-25.el5 libvirt-0.6.3-25.el5 libvirt-python-0.6.3-25.el5
You have to specify the --pool <name of pool> argument if you specify the volume by name. Volume names are only unique within a pool.
This bug has been verified with libvirt 0.6.3-25.el5 on RHEL-5.4.but I haven't permission change bug status to verified now.I will change bug statUs to 'VERIFIED' if I have. In addition, vol-delete operation led to libvirt daemon dead, I need to report a new bug. [root@dhcp-66-70-91 libvirt]# virsh pool-create pool-dir.xml Pool dirpool created from pool-dir.xml [root@dhcp-66-70-91 libvirt]# virsh vol-create dirpool vol.xml Vol virtimage created from vol.xml [root@dhcp-66-70-91 libvirt]# virsh vol-list dirpool Name Path ----------------------------------------- virtimage /var/lib/libvirt/images/virtimage [root@dhcp-66-70-91 libvirt]# virsh vol-path --pool dirpool virtimage /var/lib/libvirt/images/virtimage [root@dhcp-66-70-91 libvirt]# virsh vol-delete --pool dirpool virtimage error: Failed to delete vol virtimage error: server closed connection [root@dhcp-66-70-91 libvirt]# service libvirtd status libvirtd dead but pid file exists Addition information: 1.pool-dir.xml <pool type="dir"> <name>dirpool</name> <target> <path>/var/lib/libvirt/images</path> </target> </pool> 2.vol.xml <volume> <name>virtimage</name> <key>/var/lib/virt/images/virtimage</key> <source> </source> <capacity>10737418240</capacity> <allocation>142512128</allocation> <target> <path>/var/lib/virt/images/virtimage</path> <format type='raw'/> <permissions> <mode>0600</mode> <owner>0</owner> <group>0</group> <label>system_u:object_r:nfs_t</label> </permissions> </target> </volume>
*** Bug 530990 has been marked as a duplicate of this bug. ***
This bug has been verified with libvirt 0.6.3-25.el5 on RHEL-5.5.Already fixed, set status to VERIFIED. Version-Release number of selected component (if applicable): [root@dhcp-66-70-62 bug]# uname -a Linux dhcp-66-70-62.nay.redhat.com 2.6.18-183.el5xen #1 SMP Mon Dec 21 18:46:14 EST 2009 x86_64 x86_64 x86_64 GNU/Linux [root@dhcp-66-70-62 bug]# rpm -qa|grep libvirt libvirt-0.6.3-25.el5 libvirt-python-0.6.3-25.el5 libvirt-debuginfo-0.6.3-25.el5 [root@dhcp-66-70-62 bug]# rpm -qa|grep xen xen-libs-3.0.3-102.el5 xen-devel-3.0.3-102.el5 kmod-gnbd-xen-0.1.5-2.el5 kmod-gfs-xen-0.1.34-9.el5 xen-3.0.3-102.el5 xen-libs-3.0.3-102.el5 kernel-xen-2.6.18-183.el5 kmod-cmirror-xen-0.1.22-3.el5 Steps to Reproduce: [root@dhcp-66-70-62 ~]# cat pool-dir.xml <pool type="dir"> <name>dirpool</name> <target> <path>/var/lib/xen/images</path> </target> </pool> [root@dhcp-66-70-62 ~]# cat vol.xml <volume> <name>virtimage</name> <key>/var/lib/xen/images/virtimage</key> <source> </source> <capacity>10737418240</capacity> <allocation>142512128</allocation> <target> <path>/var/lib/xen/images/virtimage</path> <format type='raw'/> <permissions> <mode>0600</mode> <owner>0</owner> <group>0</group> <label>system_u:object_r:nfs_t</label> </permissions> </target> </volume> [root@dhcp-66-70-62 ~]# virsh pool-list --all Name State Autostart ----------------------------------------- [root@dhcp-66-70-62 ~]# virsh pool-create pool-dir.xml Pool dirpool created from pool-dir.xml [root@dhcp-66-70-62 ~]# virsh pool-list --allName State Autostart ----------------------------------------- dirpool active no [root@dhcp-66-70-62 ~]# virsh vol-create dirpool vol.xml Vol virtimage created from vol.xml [root@dhcp-66-70-62 ~]# virsh vol-list dirpool Name Path ----------------------------------------- rhel5u5_x86_64_xenfv.img /var/lib/xen/images/rhel5u5_x86_64_xenfv.img rhel5u5_x86_64_xenpv.img /var/lib/xen/images/rhel5u5_x86_64_xenpv.img virtimage /var/lib/xen/images/virtimage [root@dhcp-66-70-62 ~]# virsh vol-path --pool dirpool virtimage /var/lib/xen/images/virtimage [root@dhcp-66-70-62 ~]# virsh vol-delete --pool dirpool virtimage error: Failed to delete vol virtimage error: server closed connection Libvirtd is hang by 'virsh vol-delete',this is a another bug: https://bugzilla.redhat.com/show_bug.cgi?id=510450
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-2010-0205.html