Converting .qcow2 V Hard Disk into .VMDK (Windows/VMWare)

21,311

Solution 1

There is a build of qemu for Windows. Another note Windows handles arguments differently for some reason, so you would need to change your order to:

qemu-img convert -f qcow2 -O vmdk vdisk.qcow2 vdisk.vmdk

Solution 2

Use the updated qemu binary to convert the qcow2 image to a vmdk image by running this qemu-img convert command:

qemu-img convert -f qcow2 -O vmdk -o subformat=streamOptimized source_qcow_image_path destination_path_to_vmdk

For example:

qemu-img convert -f qcow2 -O vmdk -o subformat=streamOptimized CentOS-7-x86_64-GenericCloud-1503.qcow2 CentOS-7-x86_64-GenericCloud-1503.vmdk

Update the vmdk version setting embedded in the converted image using this script:

printf '\x03' | dd conv=notrunc of=<vmdk file name> bs=1 seek=$((0x4))

For example:

printf '\x03' | dd conv=notrunc of=CentOS-7-x86_64-GenericCloud-1503.vmdk bs=1 seek=$((0x4))
Share:
21,311

Related videos on Youtube

Francisco  Tapia
Author by

Francisco Tapia

Who i am? I'm Francisco Tapia from Chile, i'm Telecom Technician, i've two beautifull childs and a very very cute and smart wife(thats why she choose me ;D). My Skills Cisco Certified Network Associate(CCNA). Linux Eenthusiast, my favourite disto' is Debian, but personnaly im more skilled in Red Hat Based distros. Im not Proggrammer by carreer but i want to be, my favourite languaje is Python, but i know some or Ruby too, scripting languajes also i know as Shellscript. What i hate? Brogrammers. Obsolete People. People who want to hurt someone. Idiots What i'm doing now? Well. actually i've finished to learn Python, and im currently learning C++, Java, Ruby, PHP and Django. Soon i'll enroll into 2 courses RH200 and OSCP.

Updated on September 18, 2022

Comments

  • Francisco  Tapia
    Francisco Tapia over 1 year

    Is any way to convert a .qcow2 into .vmdk on Windows 7 64-bit using VMWare Workstation?

    i did that using a tool qemu-img in my linux host (SLES11):

    qemu-img convert -f qcow2 vdisk.qcow2 -O vmdk vdisk.vmdk
    

    I've only a Windows 7 host accesible ATM and if it is not possible which tool should i use?.

  • Francisco  Tapia
    Francisco Tapia about 7 years
    please read the question, before answer
  • Thalys
    Thalys about 7 years
    That you can use the same tool, and giving the command feels like an answer to me