This article is currently in draft...

qemu-img is a useful tool for anyone looking to convert virtual machine disk images from one format to another. qemu-img is also available as a win32 executable for Windows. I first used qemu-img when I needed to convert an raw disk image to VMDK format for use with VMWare workstation.

The tool supports conversion between the following formats…

  • raw disk image
  • VMDK (VMWare)
  • VDI (Virtualbox)
  • VHD, VHDX (Microsoft Hyper-V)
  • COW, COW2 (Citrix XenServer)

In addition to virtual hard drive format conversion qemu-img also allows you to work with snapshots, create, compare and resize images.

Usage Examples

Get image info including file format

qemu-img info resin-upnp-1.24.0-2.8.3-03ecb35d764f.img
image: resin-upnp-1.24.0-2.8.3-03ecb35d764f.img
file format: raw
virtual size: 1.9G (2004877312 bytes)
disk size: 1.9G

Convert from raw (.img) to VMWare (.vmdk) format

qemu-img convert os-image.img  -O vmdk os-image.vmdk
This article is currently in draft...