Qemu.img: conversion of a VMDK image failed with error “invalid VMDK image descriptor”

conversionqemuvmware-vmdk

I trying to convert a VMDK image (Windows installed) to RAW format with the qemu-img command. However, it is failing with the following error:

   $ qemu-img convert -f vmdk -O raw image.vmdk /tmp/image.img
   qemu-img: Could not open 'image.vmdk': invalid VMDK image descriptor
   qemu-img: Could not open 'image.vmdk'

As far as I can tell, the image itself seems fine, at least I can boot properly from it using VMWare Player.
I'm using qemu-img version 2.0.0.

Best Answer

Do not use the .vmdk image itself but the smaller .vmdk file which references the image.