As I have EC2 Metadata working on my vSphere (6.5) cluster, I'd like to import Cloud images to it, such as Ubuntu or CoreOS.

But they come in .qcow2 or .img (for CoreOS, which I believe is also qcow2) for OpenStack, usually.

I tried to convert them but I can't figure any way to use them in virtual machine in vSphere.

qemu-img -f qcow2 -O vmdk in.qcow2 out.vmdk
vmkfstools -i in.vmdk -d thin out.vmdk

Doesn't work. I also tried adding "-o compat6" and "-o adapter_type=lsilogic,subformat=streamOptimized,compat6", but it doesn't work. If I put "-f raw" (or remove "-f" option) it doesn't work any better...

The closest thing I got to work was trying the raw image of CentOS Cloud Image, converting it using instructions above (with "raw" instead of "qcow2"), it then boots but Grub crashes with some XFS errors above. Anyway, I'd prefer to boot qcow2 images than raw, as they're more common with CloudInit.

Is it possible to convert those qcow2 images to working and bootable vmdk ?


1 Answer 1


Yes it is possible. Perform the below step after converting using qemu-img:

 vmkfstools -i in_demo_mano.vmdk -d thin out_demo_mano.vmdk

If it is a larger file have patience to wait while the tool clones the disk :)

  • I already did that, it does not work properly, as explained in my question.
    – Hakujou
    Jun 22, 2019 at 11:02

You must log in to answer this question.

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