Tuesday, 11 May 2010

Converting VMWare .vmdk images to VirtualBox .vdi

First, we need to install the qemu emulator so that we can convert the VMWare image to a generic binary image

sudo aptitude install qemu

Use the qemu-img tool to convert to a generic .bin file;

qemu-img convert /path/to/original.vmdk converted.bin

This binary image can now be converted to Virtualbox's native .vdi format.

VBoxManage convertdd converted.bin converted.vdi

Note: If your .vmdk files are split into multiple 2Gb chunks you will need to create a single file using the following command.

vmware-vdiskmanager -r source_multiples.vmdk -t 2 single_file.vmdk

To convert a vdi back to vmware .vmdk use this command;
VBoxManage internalcommands converthd -srcformat VDI -dstformat VMDK sda.vdi sda.vmdk

No comments: