VirtualBox 6.0 / 5.2 - Export and import virtual machines in OVF (OVA)

Page 1 / 1

Although you can copy a VirtualBox virtual machine from one computer to another by simply transferring the folder from your virtual machine to a USB drive, it will not work if you want to reuse it with another virtualization solution.

To standardize the format of the virtual machines a little and offer some compatibility between the different virtualization solutions, the Open Virtual machine Format (OVF) appeared in 2007.

  1. Export your virtual machine to OVF (OVA)
  2. Import an OVF virtual machine into VirtualBox

1. Export your virtual machine to OVF (OVA)

By default, your VirtualBox virtual machine consists of :

  • a ".vbox" configuration file specific to VirtualBox
  • a virtual hard disk in vdi format (by default)
  • and some other files

To export a virtual machine from VirtualBox, go to the File menu and click : Export Appliance.

Note : when you export a virtual machine, you create a Virtual Appliance.

Choose the virtual machine you want to export in OVF format.

Select the folder where you want to export it by clicking the small folder icon.

In the "Format" list, you will see that you will have the choice between :

  • Open Virtualization Format 0.9
  • Open Virtualization Format 1.0 (default choice)
  • Open Virtualization Format 2.0
  • Oracle Public Cloud Format 1.0 (that is not the OVF, obviously).
    This option has been renamed "Oracle Cloud Infrastructure" since version 6.0 of VirtualBox.

Since VirtualBox 6.0, you will also have the possibility to keep the MAC addresses configured on the virtual network cards of your virtual machine or not thanks to the "MAC Address Policy" options :

  • Include all network adapter MAC addresses : to keep all MAC addresses
  • Include only NAT network adapter MAC addresses : same, but only for virtual network adapters in NAT mode
  • Generate New MAC Addresses For All Network Adapters : to generate new MAC addresses for all virtual network adapters in your VM.
    This is recommended if you want to simultaneously launch the original and copy of this VM on the same network.

You can also choose to include the ISO files linked to the virtual machine when it's exported or not.

To be able to check the integrity of the exported virtual machine, you have to check the "Write Manifest file" box.
So, when you want to import your virtual machine, you will be able to check if the data has not been damaged before using it.

Then, you can add info about your virtual appliance.

The name is the one that will appear in VirtualBox.

For the rest, it's useful if you distribute this virtual machine on your personal website, for example.

In our case, we will add a small description.

Since VirtualBox will convert your virtual machine's virtual hard disk to vmdk, exporting your VM may take a long time.
It all depends on the performance of your computer and the size of the hard disk used by your virtual machine.

Once the virtual machine is exported, you will find a ".ova" file.

2. Import an OVF virtual machine into VirtualBox

To import a VM into VirtualBox, go to the File menu and click : Import Appliance.

Select the ".ova" file (the OVF format archive format) or the ".ovf" file provided with the virtual machine downloaded from the Internet (for example).

The information of the virtual machine to import is displayed.
Note that you will also find the name and description specified when exporting it from VirtualBox.

In this case, VirtualBox to add a suffix "_1" because the original VM "Win 7 x64" is still present in VirtualBox.

Since version 6.0, you will be able to choose to keep all MAC addresses configured on this virtual machine or to generate new ones (as explained when exporting this one in OVF / OVA).
Something new, you will be able to import the virtual machine by converting the virtual hard disk to VDI format if you wish.
By default, the virtual hard disk is converted to vmdk when you export a virtual machine in OVF / OVA format.

VirtualBox imports the virtual machine.
Note that the imported hard disk will remain in vmdk format.

Once the virtual machine is imported, it will appear in VirtualBox.

And, in our case, 2 files will appear in a subfolder of "VirtualBox VMs" :

  • the VM configuration file in vbox format
  • the hard disk of the VM in vmdk format