Data Centers

How to export VirtualBox virtual machines as appliances

If you need to move a VirtualBox guest from one host to another, discover the most reliable way to do it.

networkingistock-452655925misticboy.jpg
Image: iStock/mistic_boy

Your data center is running like a well-oiled machine. One reason for that smooth functionality is that you have the help of virtual machines (VMs), thanks to VirtualBox. But what happens when you want to spin one of those VMs away from their current hosting server?

Say you have a web server, an email server, a database server, a Docker server, and a Nextcloud server all running on the same machine (by way of the same VirtualBox installation) and you want to move the Nextcloud server to either another data center or to a more powerful host. You might be inclined to copy the VM files from one host to the next, but that would be the wrong method. Instead, you should export the VM as an appliance, move the appliance to the new host, and then import the appliance.

How do you export a VM as an appliance? I'll walk you through the process.

SEE: Quick glossary: Virtualization (Tech Pro Research)

How to export a VM to an appliance

In order to export an appliance, your VM must be powered down. If the machine is in a Saved state, it will not export.

Once the VM in question is powered down, go to the VirtualBox main window and click File | Export Appliance. In the resulting window, locate and select the VM to be exported and click Next (Figure A).

Figure A

Figure A

Exporting a Nextcloud server as an appliance.

In the next window, select the location to hold the exported appliance file as well as format of the appliance (Figure B). By default, the file will be saved with an .ova extension, which is good because it will save the appliance as a single file; if you save the file with an .ovf extension, the appliance will be saved as separate files. In other words, stick with the default .ova extension—you can select between OVF 0.9, OVF 1.0, and OVF 2.0. The default is OVF 1.0, and it usually works fine.

After you name the appliance and select the format, click Next.

Figure B

Figure B

Selecting the format and location of the exported appliance.

In the final screen, review your settings and then click Export to start the process (Figure C).

Figure C

Figure C

The final step in the export process.

The process takes awhile; for instance, to export my Nextcloud appliance, the process took approximately 10 minutes. When the export completes, you will find an .ova file that you can move to the new host machine, import, and then enjoy the VM on its new host.

How to import a VM to an appliance

  1. Move the exported .ova file to the new host server.
  2. Open VirtualBox.
  3. Click File | Import Appliance.
  4. Locate the .ova file.
  5. Click Next.
  6. Review the Appliance settings.
  7. Click Import.

When the import completes (this process takes significantly less time than exporting), the VM is ready to start up and use.

An easy way to move VMs

Exporting VMs to appliances is one of the easiest and most reliable ways to move guests from host to host; in fact, this method should be considered the only method of migrating your VMs from host to host. Give this task a try, and see if your VMs aren't happy living in their new home.

Also see

About Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website jackwallen.com.

Editor's Picks

Free Newsletters, In your Inbox