After playing for a while with VirtualBox one realizes it has several advantages over the renowned VMWare. Though it has some serious problems handling networking and sometimes some other devices such as sound or graphic accelaration which may actually make you think twice about going back to VMWare. Over the internet you will find a lot f information about converting a VMWare virtual machine to a VirtualBox machine, but the inverse process is not so well documented. That’s why here it is my humble contribution.
Actually we will not be converting the whole virtual machine but only the disk image. The virtual machine will just be created as a reglar virtual machine in which we’ll be using the converted disk image as a disk.
In order to make this conversion we’ll need to install a qemu application called qemu-img. Also you should check the disk space as this conversion will take as much as three times the space your virtual disk image size is, or more.
1.- This first step will depend on the VirtualBox version you’re running. We need to first convert the .vdi disk image to a raw format. In older versions of VirtualBox this is accomplished by running the following command:
2.- Once the process is complete (it will take quite a while, depending on the size of the disk) we can convert the raw image to vmdk with the following command:
NOTE: If you happen to get an error with this command, try it as root or fake root (sudo)
3.- Au Revoir! It’s done now and you have a valid .vmdk disk image which can be used with a VMWare virtual machine. Just rember in newer versions of VMWare to select NO when asked to convert the disk image to the new format.
r4pp157 11:42 am on October 23, 2009
After playing for a while with VirtualBox one realizes it has several advantages over the renowned VMWare. Though it has some serious problems handling networking and sometimes some other devices such as sound or graphic accelaration which may actually make you think twice about going back to VMWare. Over the internet you will find a lot f information about converting a VMWare virtual machine to a VirtualBox machine, but the inverse process is not so well documented. That’s why here it is my humble contribution.
Actually we will not be converting the whole virtual machine but only the disk image. The virtual machine will just be created as a reglar virtual machine in which we’ll be using the converted disk image as a disk.
In order to make this conversion we’ll need to install a qemu application called qemu-img. Also you should check the disk space as this conversion will take as much as three times the space your virtual disk image size is, or more.
1.- This first step will depend on the VirtualBox version you’re running. We need to first convert the .vdi disk image to a raw format. In older versions of VirtualBox this is accomplished by running the following command:
vditool COPYDD /PATH_TO/xxxxx.vdi /PATH_TO/xxxxx.raw
In newer versions the vditool command does not exist, so you will have to issue the following:
vboxmanage -convertSettingsIgnore internalcommands converttoraw /PATH_TO/xxxxx.vdi /PATH_TO/xxxxx.raw
2.- Once the process is complete (it will take quite a while, depending on the size of the disk) we can convert the raw image to vmdk with the following command:
qemu-img convert -O vmdk /PATH_TO/xxxxx.raw /PATH_TO/xxxxx.vmdk
NOTE: If you happen to get an error with this command, try it as root or fake root (sudo)
3.- Au Revoir! It’s done now and you have a valid .vmdk disk image which can be used with a VMWare virtual machine. Just rember in newer versions of VMWare to select NO when asked to convert the disk image to the new format.