VMWare Virtual Machines are usually stored in OVA Format which is bundle of OVF(Open Virtualization Format) and in multiple *.VMDK files.
Though other Virtual Machines are supposed to also support these "open virtualization format", different VM vendors implement and support it differently, therefore though in theory VirtualBox and QEMU are said to support OVA Format. Attempts to import such usually will fail. In this little article I will explain how VMWare stored (exported) VirtualMachine machine can be succesfully imported to VirtualBox.
1. Locate where is Virtualbox .vmx files from Window search or via dir command
I'm a console guy, so I prefer looking for VMWare's .vmx from command line:
C:\Users\GGEORGI7> cd c:\ C:\> dir /s *.vmx
Volume in drive C is PC COE
Volume Serial Number is XXXX-XXXX
…
Directory of C:\Users\ggeorgi7\Documents\Virtual Machines\Debian 706/02/14 11:06 AM 2,687 Debian 7.vmx
05/28/14 15:44 PM 370 Debian 7.vmxf
2 File(s) 3,057 bytes
2. Switch to wherever the VMWare virtualmachine .vmx file is located
C:\> cd \Users\ggeorgi7\Documents\Virtual Machines\Debian 7
N.B. !Make sure the VMWare Virtualmachine is Shutdown (if it is Suspended converted file will not be properly implemented inside VirtualBox!). Whether the migrated virtualhost is suspended, launch VMWare, restore its state and Shut it down properly before starting migration with ovftool.
3. Remove Vmware-tools, Reset Display settings and Input D (before exporting to OVF) in VMWare
a) Remove vmware-tools
Vmware-tools kernel modules and stuff compiled specific for VMWare are no longer needed and might pose issues, thus it is always a good idea if previously installed in VMWare to wipe them out with cmd:
vmware-uninstall-tools.pl
b) Reset Display Device and Input Devices
Inside VMWare virtual machine Linux host, before shutting it down run:
mv /etc/X11/xorg.conf /etc/X11/xorg.conf.vmware
c) Remove Incomptable devices
To prevent issues with sound – its necessary to remove VMWare device created for soundcard, in order to let VirtualBox create its soundcard device on 1st boot after migration. To do so click on Virtual Machine and from context menu click Settings then in Hardware tab select Sound Card and Remove:
Settings -> Hardware -> Sound Card (Click Remove)
4. Make a Clone (Backup) of Virtual Machine
Its always a good idea to create backup of VMWare VM to be migrated just in case something goes wrong during migration, so you have a way to step back to the already working one. Once files are copied it might be a good idea to use use some archiver like PeaZip or 7-Zip to save some disk space.
mkdir SomeFolder
copy Path_To_Virtual_Machine Folder_for_Backup_Virtual_Machine
In my case this was
mkdir \Temp\VMWare-machine-backup
C:\>copy "C:\Users\ggeorgi7\Documents\Virtual Machines\Debian 7"\ c:\Temp\VM
ware-machine-backup
Restoring later VMWare VirtualMachines in case of some failure is done by simply copying backuped files to VMWare Working Directory folder
In case if Wondering
Where is stored VMWare Virtual Machines?
Check in:
VM -> Settings -> Options
5. Use VMWare ovftool.exe to convert .VMX to Open Virtualization Format (.OVF)
Though export from .VMX to .OVF it can be also done from VMWare GUI from:
File -> Export to OVF
Anyways I think it is better to do it via OVFTool console tool:
The most common location for VMWare Workstation is:
C:\Program Files (x86)\Vmware\Vmware Workstation\OVFTool
For VMware Player it is:
C:\Program Files (x86)\Vmware\Vmware Player\OVFTool
Very important thing to mention here is you have to be cautious, Never to run together VMWare and VirtualBox.
!! Before proceeding to next OVTool .vmx to .ovf migration Shutdown the VirtualMachine and as a best practice close VMware completely.
cd Location-directory-ofOVFTool
ovftool.exe Path-folder-to_VMVM_file.vmx Path-folder_to_VM_exportVM_file_export.ovf
C:\> cd "\Program Files (x86)\VMware\VMware Workstation"\OVFTool
C:\Program Files (x86)\VMware\VMware Workstation\OVFTool>ovftool.exe "\Users\ggeorgi7\Documents\Virtual Machines\Debian 7\Debian 7.vmx" C:\Users\ggeorg i7\vmware-debian-export.ovf
Convertion will take about 30 minutes on a normal computer hardware lets say (Dual Core PC 2Ghz with 4 Gb of RAM).
If you get a “failed to open disk” error during convertion, its likely that the virtual machine is still running or wasn’t shut down properly – boot the virtual machine and perform a shut down.
6. Launch VirtualBox, Install Guest Additions to enable Copy / Paste and USB support in Virtual Machine
After the process completes, you can boot the virtual machine. If you haven't earlier uninstalled vmware-tools uninstall VMware Tools, and install VirtualBox’s Guest Additions (in order to allow Copy / Paste between VirtualBox and guess OS).
7. Launch VirtualBox and Import exported .OVF
Once Virtual Machine is exported, to import it into VirtualBox, launch VirtualBox and choose:
File -> Import Appliance