Virtual machines are helpful in many ways. You can use them to try out new operating systems, test software, run old applications, etc.
Two of the most popular virtual machine software are VMware and VirtualBox. Both have their own pros and cons, and most of us spend a good amount of time and effort to create and maintain a virtual machine in either software. The good thing is that you can even migrate your VM from VirtualBox to VMWare, and vice versa, without having to recreate from the ground up. Here is how to do it.
- For this demonstration I’m using VMware Workstation as my other virtual machine software. Even if you are using VMware Player, the procedure is the same.
- Before starting the migration process, make sure that the VM you want to export is in “Power Off” state and not in Suspended or Paused state. This applies to both VMware and VirtualBox.
Migrate from VMware to VirtualBox
To migrate from VMware to VirtualBox, you first need to export the VM in an .ovf file. To do that open the VMware folder located inside the “Programs Files” folder in the C drive. Once you are there, open the “OVFTool” folder. Press “Shift + right-click,” and then select the “Open Command Prompt here” option.
In the command prompt window, use the below command, and press the Enter button. Don’t forget to change the path of the .vmx file of the VM you want to export and the destination for the new .ovf file.
As soon as you execute the command, the VM will be exported as an .ovf file to the marked destination.
Note: if you are using VMware Workstation, you can also export the VM as an .ovf file by navigating to “File” and then selecting the option “Export to OVF.”
Now, open up the VirtualBox and select the option “Import Appliance.”
The above action will open the “Appliance to Import” window. Here, browse and select the exported .ovf file, and click on the “Next” button.
In this window VirtualBox will show you all the VM settings. Leave them as is; you can always change them later. Just click on the “Import” button to continue.
The above action will start the import process.
Once the importing has been done, you will see your imported virtual machine in the VM VirtualBox Manager. Just select the VM, and click on the “Start” button to power on the VM.
You’ve successfully imported VM from VMware to VirtualBox.
Troubleshooting Import Errors in VirtualBox
If you are receiving importing errors, then follow the below steps.
1. Open the “export.ovf” file with your favorite text editor, find all instances of “ElementName” and replace it with “Caption.”
2. Next, find the instance of “vmware.sata.ahci” and replace it with “AHCI.”
3. Finally, calculate the SHA1 hash value of the “export.ovf” file using this online tool, and replace the old hash value with the new one found in the “export.mf” file. You can open it with any text editor.
Note: you need to replace the hash value of “SHA1(export.ovf).”
Once you are done with the changes, try importing again. This should solve the import errors. If not, you should probably create a new VM from ground up.
Migrate from VirtualBox to VMware
Migrating from VirtualBox to VMware is easy as well. Open the VirtualBox application, and select the option “Export Appliance” from the “File” menu.
The above action will open the export wizard. Here, select the VM you want to export, and click on the “Next” button to continue.
Here in this screen, select the destination, and click on the “Save” button.
VirtualBox will now show you the storage settings. Leave the defaults as is, and click on the “Next” button.
Check all the appliance settings, and click on the “Export” button to start the exporting process.
Depending on the size of the VM, the exporting process may take some time.
Once you are done exporting the VM, you can import it to VMware. To do that, open up VMware Player/Workstation, and select the “Open” option from the “File” menu.
Now select the exported .ova file.
In this screen click on the “Import” button to start the importing process.
If you receive an error saying that the import has failed to due to hardware compliance issues, simply click on the “Retry” button. This action should start the importing process.
Note: if the above action didn’t solve the problem, then you have to create a new virtual machine from ground up.
If everything goes as planned, VMware starts importing the VM. Again, the process may take some time to complete.
Once the importing has been completed, turn on the VM by clicking on the option “Power on this virtual machine.”
You’ve successfully imported or migrated your VM from VirtualBox to VMware.
Do comment below sharing your thoughts and experiences about using the above method to migrate from VMware to VirtualBox and vice versa.