formats

Convert VDI to VMDK – VirtualBox to VMware

Published on June 24, 2011, by + in linux, osx, windows.




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

10 Responses

  1. adam
    Twitter:

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

  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.

  3. Alex

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

    • 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.

  4. Alan

    Thanks, that worked real slick.

  5. 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.

  6. Luciano

    Thanks ! That worked like a charm ;-)

  7. Alex

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

  8. Pratt G

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

  9. Christian Schlichtherle

    Thanxalot – this tip saved me a lot of time!

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

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

Home linux Convert VDI to VMDK – VirtualBox to VMware