I think the correct fix should be to check qemu version and execute 
with/without compat option based on that. Can any of who have the infra use 
this way and test/fix this? I can do it now, but I don’t have reference infra 
to test/fix this.

> On 20-Nov-2014, at 11:37 pm, edison su <sudi...@gmail.com> wrote:
>
> Hi Leo,
> Our new internal build system are using ubuntu 14.04 or something like
> that, which has qemu 1.x installed by default, that's why I added the
> "compat" option in the build script, otherwise, the image build by
> qemu 1.x, won't work on RHEL 6.x.
> The fix would be, in the build script, check the version of qemu-img,
> if it's 0.x, then don't add "compat" option. There are a lot of people
> still using RHEL 6.x as KVM hypervisor, we have to make sure the image
> we build can still work on these machines.
>
> On Thu, Nov 20, 2014 at 6:49 AM, Leo Simons <lsim...@schubergphilis.com> 
> wrote:
>> Hey Edison, all,
>>
>>  
>> https://github.com/apache/cloudstack/commit/05bec59c1498dbcfb8a1089c86855fd3b433ea58
>>
>> breaks our internal build with
>>
>>    + qemu-img convert -o compat=0.10 -f raw -c -O qcow2 raw.img \
>>      systemvmtemplate-systemvm-persistent-config-4.5.0.124-kvm.qcow2
>>    Unknown option 'compat'
>>    qemu-img: Invalid options for file format 'qcow2'.
>>
>> This is on CentOS release 6.6, which has qemu-img-0.15.0-1.el6.rfx.x86_64.
>>
>> Based on
>>  http://wiki.qemu.org/OlderNews
>> that seems like it is a really old qemu (august 2011).
>>
>> I'm guessing you have a newer OS / newer qemu? Can you please let me know 
>> what OS, OS version and qemu(-img) version you are using?
>>
>> Also, does anyone know if there some minimum version of qemu-img that should 
>> be used / cloudstack assumes? Is 0.15 still ok to do an acceptable image 
>> conversion with? (we currently don't have any kvm use ourselves, but, I'd 
>> like for our build infra to produce useful kvm images nonetheless).
>>
>> According to
>>  http://wiki.qemu.org/ChangeLog/1.1
>> the -o compat switch was introduced in 1.1.
>>
>> According to
>>  https://github.com/qemu/qemu/commit/9117b47717ad208b12786ce88eacb013f9b3dd1c
>> the default format was changed from 0.10 to 1.1 in qemu 1.7 and onwards.
>>
>> The libvirt people
>>  https://bugzilla.redhat.com/show_bug.cgi?id=997977
>> say they pass -o compat when qemu supports it (so when v >= 1.1 I imagine).
>>
>> I think we should do the same in the build script and I'll make a patch.
>>
>> But, should we publish newer-format images too? According to
>>  http://wiki.qemu.org/Features/Qcow3
>> the new format is much better so I imagine qcow/kvm users will really 
>> appreciate the newer formats.
>>
>> Thoughts?
>>
>>
>> cheers,
>>
>>
>> Leo
>>
>
>
>
> --
> Best Regards,
> Edison

Regards,
Rohit Yadav
Software Architect, ShapeBlue
M. +91 88 262 30892 | rohit.ya...@shapeblue.com
Blog: bhaisaab.org | Twitter: @_bhaisaab



Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//>
CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
CloudStack Software 
Engineering<http://shapeblue.com/cloudstack-software-engineering/>
CloudStack Infrastructure 
Support<http://shapeblue.com/cloudstack-infrastructure-support/>
CloudStack Bootcamp Training Courses<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended 
solely for the use of the individual to whom it is addressed. Any views or 
opinions expressed are solely those of the author and do not necessarily 
represent those of Shape Blue Ltd or related companies. If you are not the 
intended recipient of this email, you must neither take any action based upon 
its contents, nor copy or show it to anyone. Please contact the sender if you 
believe you have received this email in error. Shape Blue Ltd is a company 
incorporated in England & Wales. ShapeBlue Services India LLP is a company 
incorporated in India and is operated under license from Shape Blue Ltd. Shape 
Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is 
operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is a company 
registered by The Republic of South Africa and is traded under license from 
Shape Blue Ltd. ShapeBlue is a registered trademark.

Reply via email to