Convert VDI to VMDK – VirtualBox to VMware

By | 2011/06/24

To convert a VirtualBox vdi image to VMware, use the built-in VirtualBox command line utility VBoxManage.

I’ll show you how!



1. First uninstall the VirtualBox Guest Additions from your VM to prepare for portability.

vbox_guest_uninstall

2. Next (if desired) copy the .vdi image file to a temp location as a backup.


3. Now determine the UUID of your existing Virtualbox image you wish to convert.

This command will list your current VirtualBox hard drive images, with their UUID:

$ VBoxManage list hdds
$ VBoxManage list hdds
UUID:        f83fa853-eded-4e67-9927-05fb72544c3d
Parent UUID: base
Format:      VDI
Location:    /Users/stmiller/VirtualBox VMs/win7_64/win7_64.vdi
State:       created
Type:        normal
Usage:       win7_64 (UUID: 3dbe6d6e-9b41-437c-9191-706c42b6eded)

UUID:        9898a049-abe0-4a9f-bc29-b196c56facbb
Parent UUID: base
Format:      VDI
Location:    /Users/stmiller/VirtualBox VMs/winxp_32/winxp_32.vdi
State:       created
Type:        normal
Usage:       winxp_32 (UUID: f28ff2cd-da7c-472a-95f3-35627b21c624)

UUID:        c4692c5f-c0db-4677-94c8-61d8aabd7a55
Parent UUID: base
Format:      VDI
Location:    /Users/stmiller/VirtualBox VMs/LinuxMint11/LinuxMint11.vdi
State:       created
Type:        normal
Usage:       LinuxMint11 (UUID: 4fd5bd2b-781c-4cd3-a0cf-f7d38e27f79f)

UUID:        86787b8d-d54e-4225-86eb-5baf410eb6d5
Parent UUID: base
Format:      VDI
Location:    /Users/stmiller/VirtualBox VMs/OSX/osx.vdi
State:       created
Type:        normal
Usage:       OSX (UUID: 3302fe98-fcdd-4e0f-a271-52d560e4fb61)

4. Now convert your .vdi image to .vmdk for vmware

In this example, I’m going to convert my Windows 64 Virtualbox image to a vmdk.

(Note you can also use the filename with absolute path of .vdi in quotes instead of the UUID.)

$ VBoxManage clonehd f83fa853-eded-4e67-9927-05fb72544c3d win764.vmdk --format vmdk

This will take a LONG time depending on your image size and also speed of your computer’s hard drive.

The output will look similar to:

$ VBoxManage clonehd f83fa853-eded-4e67-9927-05fb72544c3d  win764.vmdk --format vmdk
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'vmdk'. UUID: bdd0fcc7-b4e0-4fb6-a8d7-a2a786809b5a
$

5. Finally create a new virtual machine in vmware, replacing the provided hard disk image this new .vmdk as the hard disk image. Boot!

vmware_add_harddisk vmware_windows

13 thoughts on “Convert VDI to VMDK – VirtualBox to VMware

  1. adam

    Sweet! Thanks. Very simple, unlike other instructions that had me modifying my xorg.conf file, manually rmmodding kernel modules, and rm -rf’ing directories.

    Reply
  2. oZem

    Thanks for the tip.
    If you convert Linux machines: in the grub menu, press ‘e’ and adjust root=/dev/sda1 to be root=/dev/hda1.

    Reply
  3. Alex

    @oZem, do you mean rename the file in the original instance? Won’t that screw up your original copy?

    Reply
    1. oZem

      @Alex, once the copy is done, open the new vmdk file with VMware. In this new copy, you might have to change your grub settings as above.
      Then you should change the grub config file to save your settings.

      Reply
  4. Alex

    A necessary disclaimer (as I’ve recently witnessed) is that a VMX configuration file may be required as there’s no specification as to what version of VMware your format is compatible with.

    Reply
  5. Alex

    Just wanted to say thanks for this walkthrough, worked like a charm for me.

    Reply
  6. Pratt G

    Can anyone provide me commands forhow to convert .img to .vmdk and vice versa.
    Thaks in advance

    Reply
  7. Christian Schlichtherle

    Thanxalot – this tip saved me a lot of time!

    Reply
  8. mayur hadke

    when I convert it give me error

    Could not open virtual machine: D:\Virtual Box\orasrv(2).vmx

    File “D:\Virtual Box\orasrv(2).vmx” line 1: Syntax error.

    Please help!!!!!

    Reply
  9. Pramodh

    These instructions were just great. Got a .vmdk file. However, now need to go and upgrade vmware fusion as my mac os has changed since I last used it. Am on Yosemite and think that I will now need to shell out an additional $50 for this. ๐Ÿ™ I am trying to run developer preview of windows 10 and vbox just does not give me the seamless mode as it cannot install vbox guest additions cd in this version of the windows.
    Anyways, thanks for these simple instructions. Worked like a charm.

    If anyone knows how to get guest additions working on mac for windows 10 developer preview, would appreciate it greatly.
    TIA

    Reply
  10. itveryez

    This is the good way, just not have the way to use Vbox Manage on cmd for basic person like me
    thanks.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.