Bug Track: Qemu-img Convert Fails to Convert, Generates a 512byte File Output
Bug report:
Link: https://bugs.launchpad.net/qemu/+bug/784977
Reported by Andy Brook on 2011-05-19
Bug Description
I have a Vmware image, so I have files like ‘Ubuntu.vmdk’, want to convert to VirtualBox .vdi format using qemu, the first stage of extracting the image with ‘qemu-img convert Ubuntu.vmdk output.bin’ just generates a 512byte file: {quote}
Disk DescriptorFile
version=1 CID=36be9761 parentCID=ffffffff createType=”twoGbMaxExtentSparse”
Extent description
RW 4192256 SPARSE “Ubuntu-s001.vmdk” RW 4192256 SPARSE “Ubuntu-s002.vmdk” RW 4192256 SPARSE “Ubuntu-s003.vmdk” RW 4192256 SPARSE “Ubuntu-s004.vmdk” RW 4192256 SPARSE “Ubuntu-s005.vmdk” RW 4192256 SPARSE “Ubuntu-s006.vmdk” RW 4192256 SPARSE “Ubuntu-s007.vmdk” RW 4192256 SPARSE “Ubuntu-s008.vmdk” RW 4192256 SPARSE “Ubuntu-s009.vmdk” RW 4192256 SPARSE “Ubuntu-s010.vmdk” RW 20480 SPARSE “Ubunt {quote} Here is the input Ubuntu.vmdk file: {quote}
Disk DescriptorFile
version=1 CID=36be9761 parentCID=ffffffff createType=”twoGbMaxExtentSparse”
Extent description
RW 4192256 SPARSE “Ubuntu-s001.vmdk” RW 4192256 SPARSE “Ubuntu-s002.vmdk” RW 4192256 SPARSE “Ubuntu-s003.vmdk” RW 4192256 SPARSE “Ubuntu-s004.vmdk” RW 4192256 SPARSE “Ubuntu-s005.vmdk” RW 4192256 SPARSE “Ubuntu-s006.vmdk” RW 4192256 SPARSE “Ubuntu-s007.vmdk” RW 4192256 SPARSE “Ubuntu-s008.vmdk” RW 4192256 SPARSE “Ubuntu-s009.vmdk” RW 4192256 SPARSE “Ubuntu-s010.vmdk” RW 20480 SPARSE “Ubuntu-s011.vmdk”
The Disk Data Base
DDB
ddb.toolsVersion = “7240” ddb.adapterType = “lsilogic” ddb.geometry.sectors = “63” ddb.geometry.heads = “255” ddb.geometry.cylinders = “2610” ddb.virtualHWVersion = “6” {quote} No stack trace or other output was found. Anything I can add (other than the 20G VM image to reproduce and I’ll be happy to provide)
Cause: This is a typical subformat (twoGbMaxExtentSparse
) that VMDK driver of
current QEMU wouldn’t recognize, so that I believe this Ubuntu.vmdk is treated
as raw by qemu-img convert.
This format is already supported in qemu-vmdk branch and the supporting is expected to be upstreamed soon, where this will be fixed too.