PCs

How do I convert VirtualBox files to work with VMWare Workstation?

In this How do I, Jack Wallen walks you through the steps required to migrate a VirtualBox virtual machine file to a VMWare Workstation.

If you do any virtualization at all, you are probably familiar with either VirtualBox or VMWare. Chances are you've worked with both at one time or another. You might have started out with VirtualBox only to find yourself needing to migrate to the more corporate-friendly and powerful VMWare.

In the attempt to migrate your virtual machines from VirtualBox to VMWare, you probably found yourself suffering from a headache or two while trying to figure out just how to migrate all those already configured virtual machines from one to the other. That task probably had you giving up and reconstructing your virtual machines in VMWare. It doesn't have to be that way.

You can actually migrate those virtual machines from VirtualBox to VMWare. It's not easy, but it can be done.

One would think the process would be simple: export your virtual machine from VirtualBox to the standard .ovf format and then import the .ovf file into VMWare. The problem is that VirtualBox and VMWare do not stick to the same standards for the file format. So in order to get an .ovf VirtualBox file to import into VMWare, you will have to jump through a couple of hoops, which include having to manually modify that .ovf file by hand.

In this How do I, I'll walk you through the steps required to migrate a VirtualBox .ovf file to VMWare Workstation.

This blog post is also available in PDF format in a TechRepublic download.

Step 1: Export your virtual machine

The first step is to export your virtual machine from VirtualBox. This will, of course, assume you already have your virtual machine working, but powered off. This is a very easy task.

With VirtualBox open, click File | Export Appliance, which will open the export manager. The wizard is easy to use and will walk you through the few steps necessary to get the virtual machine exported. The only gotcha is that you need to select the legacy OVF 0.9 file as your format. This process, depending on how big your virtual machine is, can take quite some time. So go about your business while this is completing.

Once the export is done you will have three files: .vmdk, .mf, and .ovf. The .vmdk is the binary file, and the .ovf is the descriptor file for the virtual machine. Now, for the challenging part, you have to manually edit that descriptor file so that it actually meets the same OVF standards that VMWare follows.

Step 2: Editing your .ovf file

The file you need to edit will be the .ovf file that serves as the descriptor for your virtual machine. You MUST open this in a text editor. Do NOT open it in a word processor as this will add extra characters to the file, which will render it unreadable by either VirtualBox or VMWare. The first section you need to edit is the format section. Look for a line of code (near the top) that contains this phrase:

ovf:format=

What follows that section needs to be changed to:

"http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized"

The next edit (in the same file) is the Virtual SystemType, and it must be one of the following:

<vssd:VirtualSystemType>vmx-07</vssd:VirtualSystemType> (for a esx 4.0)

<vssd:VirtualSystemType>vmx-04</vssd:VirtualSystemType> (for esx 3.5.x and 4.0 hosts)

Believe it or not, the next item to edit is the rsad for the sound card. The section will look similar to:

<Item>

<rasd:Caption>sound</rasd:Caption>

<rasd:Description>Sound Card</rasd:Description>

<rasd:InstanceId>6</rasd:InstanceId>

<rasd:ResourceType>35</rasd:ResourceType>

<rasd:ResourceSubType>ensoniq1371</rasd:ResourceSubType>

<rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>

<rasd:AddressOnParent>3</rasd:AddressOnParent>

</Item>

To the above section, add the following after the first <Item> tag:

<Item ovf:required="false">

Step 3: Using the OVF tool

This step requires you to download and install the VMWare OVF Tool (you will have to log in first). The OVF tool is command-line only, and it will convert your newly prepped .ovf file into a .vmx that VMWare can use. To do this, follow these steps:

  • Click Start | Run.
  • Type cmd.
  • In the command window, change to the directory you installed the OVF Tool into and then issue the command:

    ovftool appliance.ovf new_appliance.vmx

    (Where appliance.ovf is the name of the appliance you exported from VirtualBox and new_appliance.vmx is the name you want to give the new virtual appliance. Depending on the size of your virtual appliance, this could take a while.)

Step 4: Import the appliance

The final step is to import the appliance into VMWare Workstation. To do this, you only need to click File | Import and then walk through the user-friendly wizard (Figure A).

Figure A

Convert virtual machines into VMWare.
The one step that might trip you up is the Source Type. You want to select Virtual Appliance because that is the only type of source that will accept an .ovf file (Figure B).

Figure B

Choose the Virtual Appliance Source Type.

If the import fails, your first line of defense is to make sure you edited the .ovf file correctly. If it checks out, then re-run the OVF tool and try again.

Final thoughts

The transition from VirtualBox to VMWare is not the easiest task you will ever come across. And the process is not always successful from machine to machine. The steps outlined above have been the most successful I have used to date. Does that mean the steps are always 100% successful? Not at all, and it won't be until VirtualBox and VMWare can agree on a standard, which will make this task nothing more than a few drop-down menus away from simple. But until then we are stuck with having to work with steps similar to what I have outlined above.

Now, this task isn't nearly as difficult if you are importing/exporting from one VirtualBox to another VirtualBox or one VMWare to another VMWare. It's only when you are crossing platforms that the difficulties raise their ugly heads.

Stay on top of the latest Microsoft Windows tips and tricks with TechRepublic's Windows Desktop newsletter, delivered every Monday and Thursday. Automatically sign up today!

About

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.

7 comments
mert_wmsn
mert_wmsn

After editing the .ovf file when I use the OVFtool I get an error message which says: C:\Program Files (x86)\VMware\VMware OVF Tool>ovftool ubuntuOVF.ovf ubuntuVMware.vmx Opening OVF source: ubuntuOVF.ovf Error: SHA1 digest of file ubuntuOVF.ovf does not match manifest Could you help me out pls? Thanx

billysweetness
billysweetness

I tried this and could not get it to work. I'm using vmware player, and was using vbox 3.2. In the end, I just used vmplayer to create a new image. Before I fired it up I deleted the disk I created. I then copied my virtual box disk in it's place. I removed the .lk directory. Fired it up, and it worked. go figure.

rkashyapwk
rkashyapwk

I downloaded the Oracle SOA-BPM pre-built vm from the OTN site. This is a virtual box vm and I ran through the steps outlined above to import it into VMWare workstation 7. Everything ran successfully and a vmx file was generated. The import from workstation fails stating unable to parse the ovf file when importing at the last step. I have run this on two different machines with the same results.

Mark W. Kaelin
Mark W. Kaelin

Have tried to convert a VirtualBox virtual machine into a VMWare compatible file? Were you successful?

valery.svistunov
valery.svistunov

There is ubuntuOVF.mf file in your vm's directory. It contains SHA1 checksums for *.ovf and *.vmdk. Just calculate new checksum for your *.ovf file and edit *.mf file.

alshawwa-20045078549136243675845149874891
alshawwa-20045078549136243675845149874891

yup it works fine , need a little tweaking after that but it works fine , i still prefer using the vmware converter and do a the migration using it rather than exporting it using virtualbox , takes less time plus you can edit the hard drive capacity " increase it or decrease it for faster migration. did successful conversion from virtualbox to vmplayer , vmware workstation and esxi 4 and 4.1

Editor's Picks