Step 1 – Convert VMDK to QCOW2
After powering off the VM, note the path of the boot disk by editing the settings of the VM and selecting the Virtual Disk. The boot disk will usually be the first disk listed, unless there is a bios.hddOrder value in the .vmx file for the VM.
Copy the flat VMDK from the ESX host to the Image Library, or a machine with the qemu-img command available.
After copying, convert the VMDK to a QCOW2 image.
qemu-img convert -O qcow2 <input vmdk file> <ouput qcow2 file>
For example:
qemu-img convert -O qcow2 centos6-vm-migration-flat.vmdk centos6-vm-migration.qcow2
Step 2 – Upload the Image to the Image Library Host
You can simply copy the converted qcow2 image to the Image library host’s image directory.