Bug 1299116 - qemu-img created VMDK images lead to "Not a supported disk format (sparse VMDK version too old)"
qemu-img created VMDK images lead to "Not a supported disk format (sparse VMD...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.2
All Linux
unspecified Severity medium
: rc
: ---
Assigned To: Fam Zheng
Ping Li
Yehuda Zimmerman
https://github.com/qemu/qemu/commit/3...
:
Depends On: 1299250
Blocks: 1203710 1305606 1313485
  Show dependency treegraph
 
Reported: 2016-01-15 19:47 EST by Robert Scheck
Modified: 2016-11-03 16:09 EDT (History)
11 users (show)

See Also:
Fixed In Version: qemu-kvm-1.5.3-111.el7
Doc Type: Release Note
Doc Text:
VMDK images with streamOptimized sub-format are accepted Previously, a Virtual Machine Disk (VMDK) image with a streamOptimized sub-format created by the qemu-img tool was rejected by Elastic Sky X (ESX) services, because the version number of the VMDK image was too low. In this update, the sub-format number of streamOptimized VMDK images are automatically increased. This results in the VMDK image being accepted by ESX services.
Story Points: ---
Clone Of:
: 1299185 (view as bug list)
Environment:
Last Closed: 2016-11-03 16:09:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
qemu-img-bug.ovf (7.58 KB, application/xml)
2016-01-15 19:47 EST, Robert Scheck
no flags Details
create ovf file (7.56 KB, application/x-shellscript)
2016-07-26 01:22 EDT, Ping Li
no flags Details

  None (edit)
Description Robert Scheck 2016-01-15 19:47:15 EST
Created attachment 1115355 [details]
qemu-img-bug.ovf

Description of problem:
qemu-img only creates broken VMDK image files that can't be used for within
an OVA file for importing a virtual machine into VMware vSphere/ESXi. Every
VMDK file created by qemu-img leads during import to the error message:

  Not a supported disk format (sparse VMDK version too old)

Version-Release number of selected component (if applicable):
qemu-img-1.5.3-105.el7_2.1.x86_64
qemu-img-2.5.0-3.fc24.x86_64 (rebuilt from Fedora Rawhide for RHEL 7)
VMware vSphere Client, Version 5.1.0, Build 1064113
VMware ESXi, Version 5.1.0, Build 1065491, German-000

How reproducible:
Everytime, see above and below.

Steps to Reproduce:
1. cd /tmp/
2. dd if=/dev/zero of=qemu-img-bug.img bs=1M count=1
3. qemu-img convert qemu-img-bug.img -O vmdk \
     -o adapter_type=lsilogic,subformat=streamOptimized,compat6 \
     qemu-img-bug.vmdk
4. tar cf qemu-img-bug.ova qemu-img-bug.ovf qemu-img-bug.vmdk
5. Try to import qemu-img-bug.ova into VMware -> fails with error above
6. printf '\x03' | dd conv=notrunc of=qemu-img-bug.vmdk bs=1 seek=$((0x4))
7. tar cf qemu-img-bug.ova qemu-img-bug.ovf qemu-img-bug.vmdk
8. Try to import qemu-img-bug.ova into VMware -> works as expected now

Actual results:
qemu-img created VMDK images lead to "Not a supported disk format (sparse
VMDK version too old)".

Expected results:
qemu-img created VMDK images should not lead to any error message during
import into VMware.

Additional info:
Credit for printf/dd combination at point 6 goes to Radoslav Gerganov.
Comment 2 Robert Scheck 2016-01-17 19:25:21 EST
Btw, point 6 isn't the ultimate solution, qemu-img created images are still
unusable with OVAs on VMware, see also bug #1299250 for details.
Comment 3 Ademar Reis 2016-01-19 12:01:25 EST
Robert, thanks for taking the time to enter a bug report with us. We use reports like yours to keep improving the quality of our products and releases. That said, we're not able to guarantee the timeliness or suitability of a resolution for issues entered here because this is not a mechanism for requesting support.

If this issue is critical or in any way time sensitive, please raise a ticket through your regular Red Hat support channels to make certain it receives the proper attention and prioritization that will result in a timely resolution.

For information on how to contact the Red Hat production support team, please visit: https://www.redhat.com/support/process/production/#howto
Comment 4 Robert Scheck 2016-01-19 12:38:34 EST
Ademar, thanks for the reminder.

Cross-filed case 01569297 on the Red Hat customer portal.
Comment 5 Fam Zheng 2016-01-19 23:29:36 EST
We should revisit the upstream patch that is waiting for testing/reviewing/merging:

https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg04496.html
Comment 8 Robert Scheck 2016-02-15 06:00:50 EST
Does this mean there is something to test? If so, may you share the testing
update with me (either here or via the ticket), please?
Comment 9 Fam Zheng 2016-02-15 08:22:25 EST
Yes. Replied in bz 1299250.
Comment 10 Robert Scheck 2016-02-21 09:13:14 EST
I would like to confirm that the updated RPM (qemu-img-1.5.3-108.el7.test)
works fine for me and passed all my tests regarding this issue.
Comment 11 Fam Zheng 2016-02-21 20:39:25 EST
Thanks for your testing and confirmation, Robert!
Comment 12 Mike McCune 2016-03-28 18:35:49 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 13 Miroslav Rezanina 2016-05-05 02:38:08 EDT
Fix included in qemu-kvm-1.5.3-111.el7
Comment 15 Ping Li 2016-07-26 01:22 EDT
Created attachment 1184059 [details]
create ovf file

Reproduced the issue with qemu-kvm-1.5.3-110.el7.x86_64. 
After step5, get an error "Not a supported disk format(sparse VMDK version too old)". After step 8, qemu-img-bug.ova can be imported successfully.

Verified the issue with qemu-kvm-1.5.3-111.el7.x86_64.
After step5, qemu-img-bug.ova can be imported successfully.

Steps to reproduce:
1. #dd if=/dev/zero of=qemu-img-bug.img bs=1M count=1
2. #qemu-img convert qemu-img-bug.img -O vmdk -o adapter_type=lsilogic,subformat=streamOptimized,compat6 qemu-img-bug.vmdk
3. #sh create_ovf.sh
4. #tar cf qemu-img-bug.ova qemu-img-bug.ovf qemu-img-bug.vmdk
5. Import qemu-img-bug.ova into ESXi 5.1
6. printf '\x03' | dd conv=notrunc of=qemu-img-bug.vmdk bs=1 seek=$((0x4))
7. #tar cf qemu-img-bug.ova qemu-img-bug.ovf qemu-img-bug.vmdk
8. Import qemu-img-bug.ova into ESXi 5.1
Comment 19 errata-xmlrpc 2016-11-03 16:09:31 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2585.html

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