Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save jfbvm/a254f1262ae5a89c9c89e6a89e014f4d to your computer and use it in GitHub Desktop.

Select an option

Save jfbvm/a254f1262ae5a89c9c89e6a89e014f4d to your computer and use it in GitHub Desktop.
Converting images with qemu-img convert
# Converting images with qemu-img convert
## VM images
* .qcow2 - KVM type Virtual Machines
* .vmdk - VMware and VirtualBox and ESXi
* .vhdx - Microsoft Hyper-V and Azure
## Example commands Convert qcow2 to vmdk and make it ESXi Compatible
qemu-img convert -f qcow2 -O vmdk -o subformat=streamOptimized ubuntu.qcow2 ubuntu.vmdk
### For ESXi 6 - Create a VMDK version 6 image (instead of version 4)
* https://linux.die.net/man/1/qemu-img
qemu-img convert -f qcow2 -O vmdk -o adapter_type=lsilogic,subformat=streamOptimized,compat6 ubuntu.qcow2 ubuntu.vmdk
## Example commands Convert qcow2 to vmdk and make it Hyper-V Compatible
qemu-img convert -f qcow2 -O vhdx -o subformat=dynamic ubuntu.qcow2 ubuntu.vmdk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment