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:
What follows that section needs to be changed to:
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:
To the above section, add the following after the first <Item> tag:
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 applianceThe 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).
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).
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.
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!
Jack Wallen is an award-winning writer for Techrepublic and Linux.com. As an avid promoter/user of the Linux OS, Jack tries to convert as many users to open source as possible. His current favorite flavor of Linux is Bodhi Linux (a melding of Ubuntu and Enlightenment). When Jack isn't writing about Linux he is hard at work on his other writing career -- writing about zombies, various killers, super heroes, and just about everything else he can manipulate between the folds of reality. You can find Jack's books on Amazon, Barnes & Noble, and Smashwords. Outnumbered in his house one male to two females and three humans to six felines, Jack maintains his sanity by riding his mountain bike and working on his next books. For more news about Jack Wallen, visit his website Get Jack'd.