7.12. VBoxManage export

This command exports one or more virtual machines from Oracle VM VirtualBox. You can export to either of the following:

  • A virtual appliance in OVF format, including copying their virtual disk images to compressed VMDK.

  • A cloud service, such as Oracle Cloud Infrastructure. A single VM can be exported in VMDK format.

See Section 1.15, “Importing and Exporting Virtual Machines” for more details on exporting VMs from Oracle VM VirtualBox.

7.12.1. Export to OVF

List the machine, or the machines, that you would like to export to the same OVF file and specify the target OVF file after an additional --output or -o option. Note that the directory of the target OVF file will also receive the exported disk images in the compressed VMDK format, regardless of the original format, and should have enough disk space left for them.

Beside a simple export of a given virtual machine, you can append several product information to the appliance file. Use --product, --producturl, --vendor, --vendorurl, --version and --description to specify this additional information. For legal reasons you may add a license text or the content of a license file by using the --eula and --eulafile option respectively.

As with OVF import, you use the --vsys X option to apply these options to the correct virtual machine.

For virtualization products which are not fully compatible with the OVF standard 1.0 you can enable an OVF 0.9 legacy mode with the --legacy09 option. Other options are --ovf09, --ovf10, --ovf20.

To specify options controlling the exact content of the appliance file, you can use --options to request the creation of a manifest file, which enables detection of corrupted appliances on import, the additional export of DVD images, and the exclusion of MAC addresses. You can specify a list of options, such as --options manifest,nomacs. For details, check the help output of VBoxManage export.

7.12.2. Export to Oracle Cloud Infrastructure

By default, an exported disk image is converted into stream VMDK format. This ensures compatibility with Oracle Cloud Infrastructure.

List the machine that you want to export to Oracle Cloud Infrastructure and specify the target cloud service provider by using the --output or -o option.

To export a VM to a cloud service such as Oracle Cloud Infrastructure, use the --cloud option to specify the VM to export. This option works in the same way as the --vsys option for OVF export.

Some of the following options are settings for the VM instance. As a result, you must enter an Oracle Cloud Identifier (OCID) for a resource. Use the Oracle Cloud Infrastructure Console to view OCIDs.

  • --output/-o: Specifies the short name of the cloud service provider to which you export. For Oracle Cloud Infrastructure, enter OCI://.

  • --cloud number-of-virtual-system: Specifies a number that identifies the VM that you are exporting. Numbering starts at 0 for the first VM.

  • --vmname name: Specifies the name of the exported VM. This name is used as the VM instance name in Oracle Cloud Infrastructure.

  • --cloudprofile cloud-profile-name: Specifies the cloud profile that is used to connect to the cloud service provider. The cloud profile contains your Oracle Cloud Infrastructure account details, such as your user OCID and the fingerprint for your public key. See Section 1.15.4, “Exporting an Appliance to Oracle Cloud Infrastructure”.

    To use a cloud profile, you must have the required permissions on Oracle Cloud Infrastructure.

  • --cloudshape shape: Specifies the shape used for the VM instance. The shape defines the number of CPUs and the amount of memory allocated to the VM instance. The shape must be compatible with the exported image.

  • --clouddomain domain: Specifies the availability domain to use for the VM instance. Enter the OCID for the availability domain.

  • --clouddisksize disk-size-in-GB: Specifies the disk size used for the exported disk image in gigabytes. The minimum value is 50 GB and the maximum value is 300 GB.

  • --cloudbucket bucket-name: Specifies the bucket in which to store the uploaded files. In Oracle Cloud Infrastructure, a bucket is a logical container for storing objects.

  • --cloudocivcn OCI-vcn-ID: Specifies the virtual cloud network (VCN) to use for the VM instance. Enter the OCID for the VCN.

  • --cloudocisubnet OCI-subnet-ID: Specifies the subnet of the VCN to use for the VM instance. Enter the OCID for the subnet.

  • --cloudkeepobject true | false: Specifies whether to store the exported disk image in Oracle Object Storage.

  • --cloudlaunchinstance true | false: Specifies whether to start the VM instance after the export to Oracle Cloud Infrastructure completes.

  • --cloudpublicip true | false: Specifies whether to enable a public IP address for the VM instance.

The following example shows a typical command line for exporting a VM to Oracle Cloud Infrastructure.

# VBoxManage export myVM --output OCI:// --cloud 0 --vmname myVM_Cloud \
--cloudprofile "standard user" --cloudbucket myBucket \
--cloudshape VM.Standard2.1 --clouddomain aaaa:US-ASHBURN-AD-1 --clouddisksize 50  \
--cloudocivcn ocid1.vcn.oc1.iad.aaaa... --cloudocisubnet ocid1.subnet.oc1.iad.aaaa... \
--cloudkeepobject true --cloudlaunchinstance true --cloudpublicip true