There are lot of people blogged around the web on converting VDI file to VMDK file. I tried almost every tips without luck. Finally, i was able to convert my Virtual Box hard disk file to VM Player hard disk file with a single Virtual Box Command. You can do that with Virtual Box Manage application that comes with Virtual Box. I am running Oracle Virtual Box 3.2.8 which is latest. The command i am going to show you may not work with your Virtual Box installation so upgrade with current version. There is no need to install QEMU for file conversion.

Syntax:

VBoxManage internalcommands createhd -srcformat <VDI|VMDK|VHD|RAW> -dstformat <VDI|VMDK|VHD|RAW> <input file name with full path> <output file name with full path>

Command for converting VDI file to RAW file.

VBoxManage internalcommands createhd -srcformat VDI -dstformat RAW <input file name with full path> <output file name with full path>

Command for converting RAW file to VMDK file.

VBoxManage internalcommands createhd -srcformat RAW -dstformat VMDK <input file name with full path> <output file name with full path>

In the same way you can convert VDI file directly to VMDK file without converting to raw format. The command for this as follows.

VBoxManage internalcommands createhd -srcformat VDI -dstformat VMDK <input file name with full path> <output file name with full path>

Note: As you see in the command line picture Createhd command is introduced in current version and may not be available with the future version of virtual box.


Written by Bala Krishna

Bala Krishna is web developer and occasional blogger from Bhopal, MP, India. He like to share idea, issue he face while working with the code.