qemu-img convert cannot convert a VMDK4 format file to (eg) raw (or
anything else). It silently produces a large file that mostly
contains zero bytes, and is completely unusable.
Version-Release number of selected component (if applicable):
Tested with qemu-img 0.10.5, 0.11.0, and
git d9a50a366f2178 (2009-12-11).
How reproducible:
Always.
Steps to Reproduce:
1. Export to OVF from VMWare vSphere / ESX 4.0.0.
2. Copy the resultant disk image to a Fedora machine.
3. Check the SHA1 sums (from *.mf file) to make sure image was not
corrupted during the copy.
4. Run:
qemu-img convert -O raw TestLinux-disk1.vmdk TestLinux-disk1.raw
5. Try to mount / use the resulting raw file, eg. using guestfish.
Actual results:
The raw file contains mostly zeroes, see below. It contains zeroes
where there should be partition tables, superblocks etc. and so is
totally unusable.
Expected results:
A usable disk image.
Additional info:
Compare the entropy of the VMDK file with the resulting raw disk.
I would expect the entropy to be about the same, but you can see the
raw disk is mostly compressible (zeroes).
Description of problem:
qemu-img convert cannot convert a VMDK4 format file to (eg) raw (or
anything else). It silently produces a large file that mostly
contains zero bytes, and is completely unusable.
Version-Release number of selected component (if applicable):
Tested with qemu-img 0.10.5, 0.11.0, and
git d9a50a366f2178 (2009-12-11).
How reproducible:
Always.
Steps to Reproduce: disk1.vmdk TestLinux-disk1.raw
1. Export to OVF from VMWare vSphere / ESX 4.0.0.
2. Copy the resultant disk image to a Fedora machine.
3. Check the SHA1 sums (from *.mf file) to make sure image was not
corrupted during the copy.
4. Run:
qemu-img convert -O raw TestLinux-
5. Try to mount / use the resulting raw file, eg. using guestfish.
Actual results:
The raw file contains mostly zeroes, see below. It contains zeroes
where there should be partition tables, superblocks etc. and so is
totally unusable.
Expected results:
A usable disk image.
Additional info:
Compare the entropy of the VMDK file with the resulting raw disk.
I would expect the entropy to be about the same, but you can see the
raw disk is mostly compressible (zeroes).
$ ls -l TestLinux- disk1.vmdk disk1.vmdk disk1.vmdk | wc -c
-rw-rw-r-- 1 rjones rjones 887312896 2009-12-18 10:35 TestLinux-
$ gzip -c TestLinux-
860846320
$ gzip -c TestLinux-disk1.raw | wc -c
8744715
VMWare's OVF metadata says the following about the disk format:
<References> "TestLinux- disk1.vmdk"
ovf: id="file1" ovf:size= "887312896" />
ovf: capacityAllocat ionUnits= "byte * 2^30"
ovf: diskId= "vmdisk1" ovf:fileRef="file1"
ovf: format= "http:// www.vmware. com/interfaces/ specifications/ vmdk.html# streamOptimized" />
<File ovf:href=
</References>
<DiskSection>
<Info>Virtual disk information</Info>
<Disk ovf:capacity="8"
</DiskSection>
qemu-img 0.10.5 fails in a different way. It gives the error
message:
qemu-img: error while reading
qemu-img >= 0.11.0 fail silently, no error message or error code.
I've tried this with several disk images exported from vSphere 4
and they have all failed to convert in the same way.
Test files (at time of writing these are STILL UPLOADING, with ETA
of 2009-12-19).
http:// homes.merjis. com/~rich/ TestLinux- disk1.vmdk 5ACC51DA9D02593 5470149D55 homes.merjis. com/~rich/ TestLinux. ovf 1A1FCBB728769B5 F71056A580
SHA1: 2C81BAE89210B07
http://
SHA1: 30831689B8C6F1B