4

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.

4 Answers 4

12

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

2
  • Yep. It does work with ESXi 5.1 vmdk and qemu 2.2.0.
    – Bgs
    Jan 19, 2015 at 19:46
  • 1
    This is the correct answer and should be marked as such Jun 26, 2015 at 9:13
1

It may be the VMDK file is using an image format not supported by QEMU. An example of this is detailed http://brezular.com/2014/07/22/how-to-run-juniper-firefly-perimeter-vsrx-on-gns3/ where the VMDK file format used by the shipped Juniper images are streamOptimized vmdk's, which need to be converted by VMDK tools to a format supported by QEMU.

0

I tend to use VBoxManage which ships with VirtualBox for converting virtual disk images from one format to another. It's very versatile and fast.

VBoxManage clonehd /path/to/image.vdmk /path/to/newimage.raw --format RAW
0

I encountered this problem as well. The root cause is that even the file extension is VMDK, the source file format may be raw. Therefore "-f raw" can fix the issue. The following command "qemu-img info [source filename]" can be issue to check the source file format.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .