Oracle VM VirtualBox can import and export virtual machines in the following formats:
Open Virtualization Format (OVF). This is the industry-standard format. See Section 1.15.1, “About the OVF Format”.
Cloud service formats. Export to and import from cloud services such as Oracle Cloud Infrastructure is supported. See Section 1.16, “Integrating with Oracle Cloud Infrastructure”.
OVF is a cross-platform standard supported by many virtualization products which enables the creation of ready-made virtual machines that can then be imported into a hypervisor such as Oracle VM VirtualBox. Oracle VM VirtualBox makes OVF import and export easy to do, using VirtualBox Manager or the command-line interface.
Using OVF enables packaging of virtual appliances. These are disk images, together with configuration settings that can be distributed easily. This way one can offer complete ready-to-use software packages, including OSes with applications, that need no configuration or installation except for importing into Oracle VM VirtualBox.
The OVF standard is complex, and support in Oracle VM VirtualBox is an ongoing process. In particular, no guarantee is made that Oracle VM VirtualBox supports all appliances created by other virtualization software. For a list of known limitations, see Chapter 14, Known Limitations.
Appliances in OVF format can appear in the following variants:
They can come in several files, as one or several disk
images, typically in the widely-used VMDK format. See
Section 5.2, “Disk Image Files (VDI, VMDK, VHD, HDD)”. They also include a textual
description file in an XML dialect with an
.ovf extension. These files must then
reside in the same directory for Oracle VM VirtualBox to be able
to import them.
Alternatively, the above files can be packed together into a
single archive file, typically with an
.ova extension. Such archive files use
a variant of the TAR archive format and can therefore be
unpacked outside of Oracle VM VirtualBox with any utility that can
unpack standard TAR files.
OVF cannot describe snapshots that were taken for a virtual machine. As a result, when you export a virtual machine that has snapshots, only the current state of the machine will be exported. The disk images in the export will have a flattened state identical to the current state of the virtual machine.
The following steps show how to import an appliance in OVF format.
Double-click on the OVF or OVA file.
Oracle VM VirtualBox creates file type associations automatically for any OVF and OVA files on your host OS.
The Appliance Settings page of the Import Virtual Appliance wizard is shown.
The Appliance Settings page shows the VMs described in the OVF or OVA file and enables you to change the VM settings.
By default, membership of VM groups is preserved on import for VMs that were initially exported from Oracle VM VirtualBox. You can change this behavior by using the Primary Group setting for the VM.
The following global settings apply to all of the VMs that you import:
Base Folder: Specifies the directory on the host in which to store the imported VMs.
If an appliance has multiple VMs, you can specify a different directory for each VM by editing the Base Folder setting for the VM.
MAC Address Policy: Reinitializes the MAC addresses of network cards in your VMs prior to import, by default. You can override the default behavior and preserve the MAC addresses on import.
Import Hard Drives as VDI: Imports hard drives in the VDI format rather than in the default VMDK format.
Click Finish to import the appliance.
Oracle VM VirtualBox copies the disk images and creates local VMs with the settings described on the Appliance Settings page. The imported VMs are shown in the list of VMs in VirtualBox Manager.
Because disk images are large, the VMDK images that are included with virtual appliances are shipped in a compressed format that cannot be used directly by VMs. So, the images are first unpacked and copied, which might take several minutes.
You can use the VBoxManage import command to import an appliance. See Section 8.16, “VBoxManage import”.
The following steps show how to export an appliance in OVF format.
Select File, Export Appliance to display the Export Virtual Appliance wizard.
On the initial Virtual Machines page, you can combine several VMs into an OVF appliance.
Select one or more VMs to export, and click Next.
The Format Settings page enables you to configure the following settings:
Format: Selects the Open Virtualization Format value for the output files.
The Oracle Cloud Infrastructure value exports the appliance to Oracle Cloud Infrastructure. See Section 1.16.8, “Exporting an Appliance to Oracle Cloud Infrastructure”.
File: Selects the location in which to store the exported files.
MAC Address Policy: Specifies whether to retain or reassign network card MAC addresses on export.
Write Manifest File: Enables you to include a manifest file in the exported archive file.
Include ISO Image Files: Enables you to include ISO image files in the exported archive file.
Click Next to show the Appliance Settings page.
You can edit settings for the virtual appliance. For example, you can change the name of the virtual appliance or add product information, such as vendor details or license text.
Double-click the appropriate field to change its value.
Click Finish to begin the export process. Note that this operation might take several minutes.
You can use the VBoxManage export command to export an appliance. See Section 8.17, “VBoxManage export”.