In the past, moving a virtual machine (VM) from one computer to another was a tricky process. Several XML control files controlled the virtual machines and moving the VMs required editing these files and ensuring you were moving every file associated with them.

Understandably, things didn’t always go smoothly. VMs refusing to boot up, VirtualBox failing to identify VMs, and media conflicts were rather common.

Thankfully, newer versions of VirtualBox have made it much easier to move VMs from one computer to another. So, here's how you export a VirtualBox virtual machine to another computer.

Before You Move Your Virtual Machine

Moving your virtual machine is a simple process in itself, but you have to take some precautions before doing so.

First, check if you are running the newest version of VirtualBox. Navigate to File > Check for Updates. If there any updates available, install them.

Next, turn off all active VMs and close VirtualBox. Shutting down all the VirtualBox processes before exporting a VM minimizes the chances of conflicts later on.

Finally, open VirtualBox, and you are ready to export.

Related: Practical Reasons to Start Using a Virtual Machine

How to Export a VirtualBox VM

There are two simple methods that you can use to export a VirtualBox virtual machine. The first method is to use the built-in Export function to generate an exportable VDI file. The other method is to copy and paste the entire VM folder you want to move.

How to Export a Virtual Machine Using the Built-in Function

Once again, before you start exporting, power down all VMs and close VirtualBox.

After about 5 minutes, start VirtualBox and click on Tools. Then, select Export located in the right panel.

Next, click on the VM you want to export from the list and click on Next. This will open the Appliance settings panel.

Exporting VM in VirtualBox

In the Appliance settings panel, you can configure the export. You can change the resulting file format, choose a file name for the export, and define whether you want to retain the MAC addresses and other network configurations.

However, if you don’t know whether you should tinker with an option, stick to the defaults.

  1. Make sure the Format field has Open Virtualization Format 1.0 selected.
  2. In the File field, you can change the location and the name of the export. With default settings, the file will have the same name as your VM and will be exported to the Documents folder.
  3. Next, choose the MAC address option that is suitable for your needs. If you don’t have a concern with the MAC addresses, stick to the default Include only NAT network adapter MAC addresses. On the other hand, you can also strip or keep all MAC addresses. Choose the option that works best for you.
  4. Finally, in addition to selecting Write Manifest file, choose Include ISO image files if you don’t want to download the ISO files in the future. Then, click on Next which will take you to the Virtual system settings panel.
Settings for VM export

The last step of the export process is to add the virtual machine details.

  1. In the Virtual system settings, double click on any line that you want to add information to. For instance, if you want to describe the VM you are exporting, double click on the Description line and add the information.
  2. If you are not sure what to write or want to erase everything you’ve written, click on Restore Defaults.
  3. When you are ready to export the VM, select Export.
Describing VM exports

Remember, the actual export process can take anywhere from a few minutes to a few hours, depending upon your VM’s virtual storage disk size. So, be patient, don’t close VirtualBox, and don’t turn off your computer.

How to Export a Virtual Machine Using the Copy/Paste Method

This is perhaps the simplest method of exporting a VirtualBox VM. All you have to do is navigate to the VM folder, copy it, and paste it into a directory you want to export the VM.

The default VirtualBox virtual machine path is C:\Users\your user name\VirtualBox VMs. Open the folder, right-click on the VM you want to export, and choose Copy. Then, navigate to the removable drive (or different directory), right-click, and select Paste.

After connecting the USB flash drive or another removable drive, copy and paste the virtual machine.

Related: How to Transfer Files Between a Virtual Machine Guest and Host PC

How to Import a VM Into VirtualBox

Now that you have exported your VM to another computer, it is time for you to import it inside VirtualBox. The Import process only works if you have exported a VDI file using the process detailed above.

Import a VDI Using the VirtualBox Tool

Importing VMs
  1. To do this, start VirtualBox, click on Tools, and select Import.
  2. In the Appliance to import panel, make sure the Source filed is set to Local File System.
  3. Next, click on the folder icon in front of the File field, and navigate to the location of the .vdi file that you’ve exported in the previous step. Select that file and click on Next.
  4. In the next panel, check the Appliance settings selected in the previous step, and when you are satisfied, select Import. The import process can take a while, so don’t turn off your computer or close VirtualBox.

If you didn't use the Export option and copy/pasted the VM folder, the process will be a little different.

Import a Copied VM

Select File from the top toolbar and select Virtual Media Manager. Then click on Add and navigate to and select the VM folder.

Adding VMs in VirtualBox

Finally, hit Apply, and your VM will be added to VirtualBox. You can now use the VM just like you would use any other VM that you created from scratch.

VirtualBox Virtual Machines Can Be Tricky to Move if You Are Running an Outdated Version

The newest releases of VirtualBox make it easier to export and move VMs from one machine to another. So, if you are still running an older version of VirtualBox, update it as soon as possible.

Another thing to keep in mind: don’t interrupt the exporting process midway by closing the program or shutting down your computer. Doing so will likely introduce errors and conflicts when you’ll try to import the VM.