VMware Cloud Community
Ecolo
Contributor
Contributor

Convert VirtualBox VDI file to VMDK

Hi,

I would like to convert a VDI file (created by VirtualBox v2.x on Windows XP) to a VMDK file for VM Server 1.0x (host will be Win XP). Can you please suggest a procedure to perform this task?

Thanks in advance.

0 Kudos
8 Replies
vmroyale
Immortal
Immortal

Hello. Check out this resource that describes how to use QEMU to do the conversion.

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
jbruelasdgo
Virtuoso
Virtuoso

you can install VMware Converter locally in the VM you wish to convert, and select the option "import this machine"

regards

Jose Ruelas

Jose B Ruelas http://aservir.wordpress.com
0 Kudos
Ecolo
Contributor
Contributor

>

> Hello. Check out this resource that describes how to use QEMU to do the conversion.

> Good Luck!

Reading through the comments of the blog you show, I saw the most elegant solution. Just need to use VirtualBox itself: Excerpted from VirtualBox User Manual version 2.14, page 108:

> VBoxManage clonehd <uuid>|<filename> <outputfile>

> { -format VDI|VMDK|VHD|RAW|<other> }

> { -remember }

>

> format: Allow to choose a file format for the output file different from the file format of the input file.

> remember: Keep the destination image registered after it was successfully written.

0 Kudos
Ecolo
Contributor
Contributor

you can install VMware Converter locally in the VM you wish to convert, and select the option "import this machine"

This method works. A little bit long but I got a VMWare VM ready to go (vmx + vmdk generated).

FYI, The method using VirtualBox 2.14 utility (VBoxManage clonehd ...) generated a VMDK. I had to create manually a VMX by copying one from another VM. When vmx + vmdk are ready to be opened by VMWare Workstation 6.51, the image could boot for about a dozen of seconds and terminate with a serious error (something like memory corruption, or abnormal scenario. Sorry I don't remember).

As a side note, I wonder if there is a way to regenerate a new VMX file when I have only the vmdk. With VirtualBox, this is very easy.

0 Kudos
Ecolo
Contributor
Contributor

you can install VMware Converter locally in the VM you wish to convert, and select the option "import this machine"

The "Edit" button seems not to work, so here is a new post to update the previous one. The converted VM seems to work OK but it looks like something is broken. The guest OS is Windows 2008. When I use C:\Windows\system32\sysprep\sysprep.exe utility, there is an error dialog that says internal error that prevents sysprep from executing.

0 Kudos
gbossert
Contributor
Contributor

For me it was not necessary to generate a VMX. I setup a new VM in VMware Workstation and linked to the VMDK-File. (debian Lenny inside)

0 Kudos
aworkman
Enthusiast
Enthusiast

You can now "Export Appliance" from the file menu in VirtualBox which exports an OVF compliant virtual machine.

I tried the qemu-img method but the VM would not boot from the disk in Workstation as if it didn't even check the MBR.

0 Kudos
aworkman
Enthusiast
Enthusiast

you can install VMware Converter locally in the VM you wish to convert, and select the option "import this machine"

This method works. A little bit long but I got a VMWare VM ready to go (vmx + vmdk generated).

FYI, The method using VirtualBox 2.14 utility (VBoxManage clonehd ...) generated a VMDK. I had to create manually a VMX by copying one from another VM. When vmx + vmdk are ready to be opened by VMWare Workstation 6.51, the image could boot for about a dozen of seconds and terminate with a serious error (something like memory corruption, or abnormal scenario. Sorry I don't remember).

As a side note, I wonder if there is a way to regenerate a new VMX file when I have only the vmdk. With VirtualBox, this is very easy.

This is likely caused by differing storage drivers. There is a method that would allow you to add the buslogic driver into the guest while it's running in VirtualBox before exporting which is similar to the sata ahci conversion that some have performed without a fresh install.

0 Kudos