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