Skip to content

Easily convert vdi to vmdk images

Converting images from one format to another should not be that hard that’s why I wrote the article How to clone a vbox virtualbox disk and how to convert vdi to vmdk in Sun VirtualBox Vbox. Even though these articles have been written I still find a bit hard since there are other ways to convert VirtualBox to VMware.

In this article I am going to show how to convert vdi images to vmdk using the latest version of Oracle VM VirtualBox. This was tested using Windows although the steps should not change if performing them on a Linux machine.

1. If you’re running a Windows virtual machine make sure to uninstall Oracle VM VirtualBox guest. Go to the “Programs and Features” and unistall it.

2. Just to be safe make a backup of the current vdi. You can copy it to c:\\backup\\images

3. We will be using the VBoxManage command. First you need to identify the VM vdi file path of the VirtualBox machine you want to convert. To do so run the following:

VBoxManage list hdds

For a Linux OS you must run the following

$ /usr/bin/vboxmanage list hdds

4. Take notes of the VM vdi file path

UUID:        368116e4-1c4a-49c4-9723-0e973f072948
Parent UUID: base
Format:      VDI
Location:    C:\\Images\\VirtualBox_VMs\\Windows_XP\\Windows_XP.vdi

5. Convert your .vdi to .vmdk image

The syntax for VBoxManage is:

VBoxManage clonehd "<vdi file format>" <NewVM.vmdk> --format vmdk
VBoxManage clonehd "C:\\Images\\VirtualBox_VMs\\Windows_XP\\Windows_XP.vdi" WinXP.vmdk --format vmdk

The output will be similar to the one below:

VBoxManage clonehd "C:\\Images\\VirtualBox_VMs\\Windows_XP\\Windows_XP.vdi" WinXP.vmdk --format vmdk
Clone hard disk created in format 'vmdk'. UUID: 17c15f43-4d10-4b92-b8c7-9143d3c63a0a

6. Create a new virtual machine in VMware and replace the provided disk with the one created previously.

Gotchas: If you are converting a linux machine, you must change at the boot time to boot from root=/dev/hda1 instead of root=/dev/sda1. To do so in the grub menu, press ‘e’ and adjust root=/dev/sda1 to be root=/dev/hda1.

That’s it!

Posted in Knowledge Base.

Tagged with , , , , .

7 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Xer0 says

    protip: add “–variant split2g” to make it storable on FAT32 drives!

  2. Sebastian Borda says

    Hello, I’m Sebastian Borda, I live in Argentina and work in IBM as an Oracle DBA (I’m a certified one).

  3. ALI EREN ERDAL says

    Thanks for sharing this post.It’s very helped to me

  4. tom says

    gonna try this tonight. hope it works.

  5. Pratheepnathan J says

    Nice article. Was able to convert my vdi to vmdk.

    1. VBoxManage.exe will be unavailable if the Virtualbox is uninstalled as mentioned in the post.
    2. And while converting the image the vmdk gets stored somewhere under users directory and had to do search for the image. Instead following command can be used to save the clone in the specified directory;

    VBoxManage clonehd “C:\Images\VirtualBox_VMs\Windows_XP\Windows_XP.vdi” D:\WinXP.vmdk –format vmdk

    And thanks again for this great article 🙂

Continuing the Discussion

  1. how to convert vdi to vmdk in Sun VirtualBox Vbox – Leonardo Borda linked to this post on April 9, 2012

    […] also written another post which is based on the latest Oracle VirtualBox to .vmdk explaining how to easily convert vdi to vmdk. useful words: vdi to vmdk, convert vdi to vmdk, convertir vdi cdk No related […]

  2. How to clone a vbox virtualbox disk – Leonardo Borda linked to this post on April 10, 2012

    […] a look also on how to convert virtualbox to vmware […]

Some HTML is OK

or, reply to this post via trackback.