Bug 504119 - Storage driver is built without QCow2 support due to missing qemu-img BuildRequires
Storage driver is built without QCow2 support due to missing qemu-img BuildR...
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Daniel Veillard
Virtualization Bugs
Depends On:
  Show dependency treegraph
Reported: 2009-06-04 07:08 EDT by Daniel Berrange
Modified: 2009-12-14 16:23 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-02 05:23:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2009-06-04 07:08:35 EDT
Description of problem:
The libvirt spec file currntly has the BuildRequires: /usr/bin/qemu-img commented out. This needs to be uncommented, so that it will biuld with qemu-img support. This allows the libvirt storage driver to create QCow2 files. 

Since the qemu-img binary is split into a separate kvm-qemu-img RPM, this RPM can be used on both RHEL-5 Xen and RHEL-5  KVM installs equally.

Version-Release number of selected component (if applicable):
libvirt 0.6.3-4.el5

How reproducible:

Steps to Reproduce:
1. Attempt to create a qcow file using libvirt storage APIs
Actual results:

Expected results:

Additional info:
Comment 1 Daniel Veillard 2009-06-05 11:17:42 EDT
libvirt-0.6.3-6.el5 has been built in dist-5E-qu-candidate with the fix
where possible, as /usr/bin/qemu-img is only available on x86_64:

x86_64 build log configure
checking for qemu-img... /usr/bin/qemu-img
checking for qcow-create... no

ia64 build log configure
checking for qemu-img... no
checking for qcow-create... /usr/sbin/qcow-create

i386 build log configure
checking for qemu-img... no
checking for qcow-create... /usr/sbin/qcow-create

To some extend that check should be done at runtime instead for more flexibility
but that should be fixed upstream.

Comment 3 Nan Zhang 2009-06-08 05:20:51 EDT
This bug has been verified with libvirt 0.6.3-6 on RHEL-5.4. Fixed.

[root@dhcp-66-70-85 storage]# virsh pool-list
Name                 State      Autostart 
default              active     yes       

You have new mail in /var/spool/mail/root
[root@dhcp-66-70-85 storage]# virsh vol-list --pool default
Name                 Path                                    
demo.img             /var/lib/libvirt/images/demo.img

[root@dhcp-66-70-85 storage]# virsh vol-create default volume.xml 
Vol test.img created from volume.xml

[root@dhcp-66-70-85 storage]# virsh vol-list --pool default
Name                 Path                                    
demo.img             /var/lib/libvirt/images/demo.img        
test.img             /var/lib/libvirt/images/test.img        

[root@dhcp-66-70-85 storage]# file /var/lib/libvirt/images/test.img
/var/lib/libvirt/images/test.img: QEMU Copy-On-Write disk image version 2, size 1 + -2147483648

Create a qcow2 file using libvirt storage APIs successful.
Comment 5 errata-xmlrpc 2009-09-02 05:23:56 EDT
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.


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