Monday, December 3, 2012

Converting VMWare Workstation Machines to VirtualBox Machines

I had installed the VMWare Workstation 8 demo several months ago.  When it expired, I tried to remove it and the uninstall failed.  Since then, I haven’t been able to reinstall or remove it with several different methods I found online.  I ended up using Oracle’s VirtualBox instead.  However, most of the VMs I’ve been given have been built in VMWare.  I haven’t been able to directly import the vmdk files into a VM because when I do, I get a startup loop.

This loop gives me the VirtualBox screen, then goes to the Windows loading screen, and then I get the Blue Screen of Death.  It does this in an infinite loop.  So, I’ve found that I can use VMWare’s OVF Tool to convert the images to an Open Virtualization Format VM then import into VirtualBox.

Unfortunately, even that isn’t completely straight forward.  Let’s take a look at the issues and solutions.

Issue #1 – How to use the OVF Tool             

First off, it’s a command line tool.  Run the command prompt as administrator.  Then navigate to the folder where the tool is installed.  For me, this is C:\Program Files\VMWare\VMWare OVF Tool.  Next is the actual command.  Here’s my example:
Ovftool.exe “C:\users\me\VMs\SP2013\SP2013.vmdk” C:\users\me\VMs\SP2013\SP2013.ovf”
The first parameter is the path to the existing vmdk.  The second is the file name/path for the ovf file that you want to create.  Seems simple enough, right?  Well, I tried to drop it in another folder, but when I went to import it, it failed.  Apparently the tool doesn’t update paths when creating the file.  Once I settled on using the same folder, it worked.  Unfortunately, it took 1.5-2 hours for each of the VMs I just converted to complete.  They were both under 60 GB.

Issue #2 – Device is already attached

When I went to import the OVF into VirtualBox, I received the follow error:
Device is already attached to port 1, device 0 of controller 'IDE Controller' of this virtual machine.
Result Code: VBOX_E_OBJECT_IN_USE (0x80BB000C)
Component: SessionMachine
Interface: IMachine {22781af3-1c96-4126-9edf-67a020e0e858}
I opened the OVF file in Notepad++ and found that I had two IDE controllers for hard drives.  There was only one drive for the machine.  I removed the markup for the port 1, device 0 controller.  Save the file and attempt to import the OVF again.

Issue #3 – SHA1 mismatch

After resolving Issue #2, I received this message:
The SHA1 digest of 'SP2013.ovf' does not match the one in '' (VERR_MANIFEST_DIGEST_MISMATCH).
Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: Appliance
Interface: IAppliance {3059cf9e-25c7-4f0b-9fa5-3c42e441670b}
I tried to modify the OVF again to update the SHA1, but I never found the value.  Instead, I removed the file completely.  Once I did this, the first machine was able to successfully import and start up.

Issue #4 – Unknown Element Config

When trying to import the second VM, I received this error:
Error reading "C:\Users\me\VMs\SP2010\SP2010.ovf": unknown element "Config" under Item element, line 47.
Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: Appliance
Interface: IAppliance {3059cf9e-25c7-4f0b-9fa5-3c42e441670b}
It seems that when I created this OVF, additional configuration came through that isn’t supported by VirtualBox.  I removed 3 or 4 instances of Config elements in the OVF XML and this error stopped appearing.


So, I realized that I’m overcomplicating this whole process.  I started down the OVF track because I thought I couldn’t just mount the VMDK directly.  That was completely wrong.  What seems to be the issue was when I was trying to mount the drive, it was mounting as a SATA drive, not IDE.  Once I mounted as IDE, everything worked just fine.  So, maybe the above will be useful for someone down the road, but the true moral of the story is that VirtualBox doesn’t like SATA drives.  IDE is the way to go.


  1. I had and corrected "Issue #4 – Unknown Element Config" in the ovf-xml file but after that i did't updated the .mf file in which is a sha1sum of ovf file so i had to correct that too

  2. Thank you - I had both Issue #2 and #3 .Was abel to reslove the problem, following your document.

  3. This was really helpful for me! I hit almost all these issues too.

  4. I had issues #3 and #4 and your blog entry helped me to solve it. Thank you!

  5. Thank you so much It was really helpful, Thanks again. :)

  6. After installing Virtual box 4.2.14
    I couldn't delete mf file, because import got hang.
    After several tried I uninstalled and installed 4.2.8 and deleted manifest file and everything ok.

    The commandline import helped a lot
    1) to see the parameter
    vboxmanage import macsleop.ovf --dry-run
    2) run the import in example importin a mac
    :vboxmanage import macsleop.ovf --vsys 0 --ostype MacOS

  7. I had issues #2 and #3, and your post was very helpful: I removed the relevant sections from the .ovf file and deleted the .mf file and the vm imported perfectly.

    Thank you very much!


  8. I have no problem with SATA drives in VirtualBox.