Hide Forgot
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).
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
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.
(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