Hide Forgot
Description of problem: Use command 'vol-create' with the Vol XML to create a volume,but it will failed with error: "command 'vol-create' requires <file> option" Version-Release number of selected component (if applicable): libvirt-0.8.7-14.el6.x86_64 qemu-img-0.12.1.2-2.152.el6.x86_64 qemu-kvm-0.12.1.2-2.152.el6.x86_64 kernel-2.6.32-125.el6.x86_64 How reproducible: 5/5 Steps to Reproduce: 1.Setup a pool of directory type with that xml. <pool type='dir'> <name>dir_pool</name> <uuid>70a7eb15-6c34-ee9c-bf57-69e8e5ff3fb2</uuid> <capacity>0</capacity> <allocation>0</allocation> <available>0</available> <source> </source> <target> <path>/var/lib/libvirt/images</path> <permissions> <mode>0700</mode> <owner>0</owner> <group>0</group> <label>some_label_t</label> </permissions> </target> </pool> # virsh pool-define dir_pool.xml # virsh pool-start dir_pool Pool dir_pool started 2. Create a raw vol #cat raw.xml <volume> <name>raw.img</name> <source> </source> <capacity>22300000</capacity> <allocation>22300000</allocation> <target> <path>/var/lib/libvirt/images/raw.img</path> <format type='raw'/> </target> </volume> # virsh vol-create --pool dir_pool raw.xml error: command 'vol-create' requires <file> option Actual results: Use command 'vol-create' with the Vol XML to create a volume,but it will failed with error: "command 'vol-create' requires <file> option" Expected results: Volume should be created successfully Additional info: 1.If add option "--file" vol created will be successful. # virsh vol-create --pool dir_pool --file col.xml Vol raw.img created from col.xml 2.Or if delete option "--pool" vol created will be successful. # virsh vol-create dir_pool col.xml Vol raw.img created from col.xml
Since RHEL 6.1 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
patch posted to upstream: http://www.redhat.com/archives/libvir-list/2011-April/msg00235.html
see bug 693963 for an alternate upstream patch
Fixed in RHEL 6.1 as a nice side-effect of 693963. Love it when that happens :) *** This bug has been marked as a duplicate of bug 693963 ***