Bug 691305 - Create a volume failed with error: "command 'vol-create' requires <file> option"
Summary: Create a volume failed with error: "command 'vol-create' requires <file> option"
Keywords:
Status: CLOSED DUPLICATE of bug 693963
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.1
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-28 06:40 UTC by wangyimiao
Modified: 2011-04-25 20:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-25 20:07:40 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 693963 0 unspecified CLOSED [6.1] regression - virsh freecell shouldn't require "--cellno" 2021-02-22 00:41:40 UTC

Internal Links: 693963

Description wangyimiao 2011-03-28 06:40:17 UTC
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

Comment 2 RHEL Program Management 2011-04-04 02:10:18 UTC
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.

Comment 3 Osier Yang 2011-04-05 12:39:55 UTC
patch posted to upstream:

http://www.redhat.com/archives/libvir-list/2011-April/msg00235.html

Comment 5 Eric Blake 2011-04-12 21:40:00 UTC
see bug 693963 for an alternate upstream patch

Comment 6 Eric Blake 2011-04-25 20:07:40 UTC
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 ***


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