Bug 1028990 - QEMU could not handle VMDK description file
Summary: QEMU could not handle VMDK description file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.6
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Fam Zheng
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-11 12:33 UTC by Fam Zheng
Modified: 2014-04-28 05:49 UTC (History)
10 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.415.el6_5.2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-28 05:49:57 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Fam Zheng 2013-11-11 12:33:37 UTC
Create a monolithicFlat VMDK image and use "qemu-img info" to check it, it doesn't detect the correct info:

$ ./qemu-img create -f vmdk -o subformat=monolithicFlat /tmp/a.vmdk 1GFormatting '/tmp/a.vmdk', fmt=vmdk size=1073741824 compat6=off subformat='monolithicFlat' zeroed_grain=off
$ ./qemu-img info /tmp/a.vmdk
image: /tmp/a.vmdk
file format: raw   <--------- This is wrong format detection
virtual size: 0 (0 bytes)
disk size: 4.0K


The cause is the QEMU block layer can't read unaligned bytes in the end of image. (modulo 512 bytes).

Comment 2 Sibiao Luo 2013-11-12 02:22:12 UTC
Tried with qemu-kvm-0.12.1.2-2.415.el6.x86_64, but did not meet such issue.
fam, did you use the upstream qemu version ?

host info:
# uname -r && rpm -q qemu-kvm
2.6.32-425.el6.x86_64
qemu-kvm-0.12.1.2-2.415.el6.x86_64

# qemu-img create -f vmdk -o subformat=monolithicFlat /tmp/a.vmdk 1G
Formatting '/tmp/a.vmdk', fmt=vmdk size=1073741824 compat6=off subformat='monolithicFlat' zeroed_grain=off 
# qemu-img info /tmp/a.vmdk 
image: /tmp/a.vmdk
file format: vmdk
virtual size: 1.0G (1073741824 bytes)
disk size: 4.0K

Best Regards,
sluo

Comment 3 Sibiao Luo 2013-11-12 02:47:24 UTC
Also tried the qemu-kvm-0.12.1.2-2.415.el6_5.1.x86_64 and qemu-kvm-0.12.1.2-2.415.el6_5.2.x86_64 version that all of them are OK.

Comment 4 Sibiao Luo 2013-11-12 02:51:41 UTC
(In reply to Sibiao Luo from comment #3)
> Also tried the qemu-kvm-0.12.1.2-2.415.el6_5.1.x86_64 and
> qemu-kvm-0.12.1.2-2.415.el6_5.2.x86_64 version that all of them are OK.
Retried it again, this issue is on qemu-kvm-0.12.1.2-2.415.el6_5.1.x86_64 and we fixed it on qemu-kvm-0.12.1.2-2.415.el6_5.2.x86_64.

# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.415.el6_5.1.x86_64
# qemu-img create -f vmdk -o subformat=monolithicFlat /tmp/a.vmdk 1G
Formatting '/tmp/a.vmdk', fmt=vmdk size=1073741824 compat6=off subformat='monolithicFlat' zeroed_grain=off 
# qemu-img info /tmp/a.vmdk
image: /tmp/a.vmdk
file format: raw
virtual size: 0 (0 bytes)
disk size: 4.0K

# rpm -Uvh qemu-kvm-0.12.1.2-2.415.el6_5.2/*
Preparing...                ########################################### [100%]
   1:qemu-img               ########################################### [ 20%]
   2:qemu-kvm               ########################################### [ 40%]
   3:qemu-kvm-tools         ########################################### [ 60%]
   4:qemu-kvm-debuginfo     ########################################### [ 80%]
   5:qemu-guest-agent       ########################################### [100%]
# qemu-img create -f vmdk -o subformat=monolithicFlat /tmp/a.vmdk 1G
Formatting '/tmp/a.vmdk', fmt=vmdk size=1073741824 compat6=off subformat='monolithicFlat' zeroed_grain=off 
# qemu-img info /tmp/a.vmdk
image: /tmp/a.vmdk
file format: vmdk
virtual size: 1.0G (1073741824 bytes)
disk size: 4.0K

Base on above, mark qa_ack+ to it.

Best regards,
sluo


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