Converting VMDK to VDI
VMDK to VDI using VBoxManage (Recommended)
This command duplicates a registered virtual hard disk image to a new image file with a new unique identifier (UUID). The new image can be transferred to another host system or imported into VirtualBox again using the Virtual Media Manager; see the section called “The Virtual Media Manager” and the section called “Cloning disk images”. The syntax is as follows:
The disk image to clone as well as the target image must be described either by its UUIDs (if the mediums are registered) or by its filename. Registered images can be listed by VBoxManage list hdds (see the section called “VBoxManage list” for more information). A filename must be specified as valid path, either as an absolute path or as a relative path starting from the current directory.
VMDK to VDI CANNOT be done directly using qemu, it has to be split into 2 steps:
1. convert vmdk to raw (qemu-img)
2. convert raw to vdi (VirtualBox - VBoxManage)
NOTE: by default the format is VDI.
For compatibility with earlier versions of VirtualBox, the "convertdd" command is also supported and mapped internally to the "convertfromraw" command.
Sample output => (converting Cloud Foundry micro instance)
Description: qemu utilities This package provides some utilities for which full qemu-kvm is not needed, in particular qemu-nbd and qemu-img.
qemu-img - QEMU disk image utility
Supported imaged file formats
Raw disk image format (default). This format has the advantage of being simple and easily exportable to all other emulators. If your file system supports holes (for example in ext2 or ext3 on Linux or NTFS on Windows), then only the written sectors will reserve space. Use "qemu-img info" to know the real size used by the image or "ls -ls" on Unix/Linux.
QEMU image format, the most versatile format. Use it to have smaller images (useful if your filesystem does not supports holes, for example on Windows), optional AES encryption, zlib based compression and support of multiple VM snapshots.
Old QEMU image format. Left for compatibility.
User Mode Linux Copy On Write image format. Used to be the only growable image format in QEMU. It is supported only for compatibility with previous versions. It does not work on win32.
VirtualBox 1.1 compatible image format.
VMware 3 and 4 compatible image format.
VirtualPC compatible image format (VHD).
Linux Compressed Loop image, useful only to reuse directly compressed CD-ROM images present for example in the Knoppix CD-ROMs.