Skip to content

Small improvements to VMDK4 file handling

Richard W.M. Jones qemu-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2VMDK4: Parse the VMDK descriptor explicitly, improve handling of CIDsblock/vmdk.c+142 -310 replies
1/2VMDK4: Parse the VMDK descriptor explicitly, improve handling of CIDsblock/vmdk.c+143 -310 replies
2/2VMDK4: Parse and check the createType (VMDK file type) field.block/vmdk.c+21 -00 replies
2/2VMDK4: Parse and check the createType (VMDK file type) field.block/vmdk.c+21 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/2] Small improvements to VMDK4 file handling

We're tracing a bug in "qemu-img convert" where it will silently fail to convert certain types of VMDK file. The VMDK files produced by VMWare vSphere / ESX 4.0, which have the VMDK subformat "streamOptimized" are one notable case:

https://bugzilla.redhat.com/show_bug.cgi?id=548723

These two patches certainly don't fix this, but they do at least prevent "qemu-img convert" from silently failing.

Unfortunately to do this I had to look much more deeply into the VMDK format than the current VMDK block driver does. We have to parse the VMDK4 plain text descriptor which is embedded in these binary files.

So the first patch adds the parsing and has the benefit of improving how the CID and parentCID fields are read and updated.

The second patch parses the createType field from the descriptor, and refuses to continue if it's not on a short whitelist of subformats which we are likely to be able to parse.

Rich.

Signature · 4 lines
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top