How to Transfer VirtualBox VMs to Another Host
This guide walks you through moving a VirtualBox virtual machine (VM) from one computer to another, including the guest OS, installed applications, and all settings. You’ll need access to both the source and destination hosts, and you’ll decide between two main methods: exporting an appliance file or copying the VM folder directly. Both approaches work for any host OS (Windows, macOS, Linux) as long as the VirtualBox versions are reasonably close.
What You’ll Need
- Administrator or user-level access to both the source and destination computers.
- VirtualBox installed on the destination host (same or newer version than the source; older versions may not read newer VM files).
- Enough free disk space on the destination for the VM’s virtual disk plus a safety margin.
- A way to move files between the two machines: USB drive, external hard drive, network share, or a cloud storage service.
- If the VM uses snapshots, note that the export method will flatten them; the folder-copy method preserves them.
Step-by-Step
Method 1: Export and Import (Recommended for Most Users)
- Shut down the VM cleanly. In the source VirtualBox Manager, select the VM and choose Machine > Close then ACPI Shutdown or Power Off. Do not just close the window without shutting down — a corrupted disk can result.
- Open the Export dialog. In the VirtualBox Manager, go to File > Export Appliance. Select the VM from the list and click Next.
- Choose export settings. Pick a destination folder and a filename. The default format is Open Virtualization Format 2.0 (.ova). You can leave the default settings, but for a single VM, uncheck “Include manifest” if you want a smaller file (the manifest adds a checksum). Click Next.
- Review and export. The next screen shows the VM configuration. You can change the MAC address policy if needed (usually leave as “Generate new MAC addresses” to avoid conflicts on the new host). Click Export. Wait for the progress bar to complete; this can take a while for large disks.
- Transfer the .ova file to the destination host using your chosen method (USB, network, etc.).
- Import the appliance. On the destination host, open VirtualBox Manager and go to File > Import Appliance. Browse to the .ova file and click Next.
- Adjust import settings. You can change the VM name, RAM, CPU count, and disk location. For most transfers, keep the defaults. Click Import and wait for the process to finish.
- Start the VM. Once imported, select the VM and click Start. The guest OS should boot as if nothing changed.
Method 2: Direct Folder Copy (Preserves Snapshots, Faster for Local Moves)
- Shut down the VM completely as described above.
- Find the VM’s folder. In the VirtualBox Manager, right-click the VM and select Settings. Go to the General tab and note the “Home Folder” path. Alternatively, go to File > Preferences > General to see the default machine folder.
- Copy the entire folder to the destination host. The folder contains the .vbox configuration file and the virtual disk files (.vdi, .vmdk, etc.). Use a file copy that preserves timestamps and attributes; on Windows, standard copy works; on Linux/macOS, use
cp -aorrsync -av. - Register the VM on the destination. On the destination host, go to Machine > Add (or press Ctrl+A). Browse to the .vbox file you just copied and select it. The VM appears in the list.
- Fix any path issues. If the VM’s virtual disk is stored in a different location than the .vbox file, you may need to update the media settings. Right-click the VM, go to Settings > Storage, and re-attach the disk if it shows as “Not attached”.
- Start the VM to verify it works.
Common Mistakes
- Copying a VM while it is running — this often leads to a corrupted disk image. Always shut down cleanly.
- Forgetting to transfer the virtual disk — if you only copy the .vbox file, the VM will fail to boot because the disk is missing.
- Using an older VirtualBox version on the destination — newer VM configurations may not be readable. Update VirtualBox on the destination before importing.
- Ignoring MAC address conflicts — if you export with “Keep MAC addresses” and the new host already has a VM using the same address, you may get network issues. Generate new MAC addresses during import.
- Not enough free space on the destination — a VM with a 20 GB disk may need 25+ GB during import. Check space before starting.
Tips
- If you use the export method, you can compress the .ova file further by zipping it before transfer, especially if you’re sending over the internet.
- Use the File > Export Appliance option to create a single-file backup of your VM. Keep it on an external drive for disaster recovery.
- If you have multiple VMs, consider using the Clone feature to create a copy on the same host before moving, then transfer the clone — this leaves the original intact.
- After importing, install the VirtualBox Guest Additions again if you had them installed; the version may need to match the new VirtualBox version for best performance.
- For large VMs, a direct network transfer (e.g., using
scpor a shared folder) is often faster than copying to an intermediate USB drive.
Troubleshooting
- “Cannot register the hard disk” error during import. This usually means the disk file is missing or the path is wrong. Check that the .vdi or .vmdk file is in the same folder as the .ova or .vbox, and that you have read permissions.
- VM boots to a black screen or hangs. This often happens when the VM’s hardware settings differ (e.g., CPU type). Try enabling I/O APIC in Settings > System > Processor or increasing video memory. Also, ensure the guest OS has the correct drivers — reinstalling Guest Additions helps.
- Network adapter shows “cable unplugged” after import. This is a MAC address issue. In the VM settings, go to Network, click Advanced, and replace the MAC address with a new one (or re-import with “Generate new MAC addresses”).
- Import fails with “Invalid settings” or “Unknown version”. The .ova may be from a newer VirtualBox. Update VirtualBox on the destination to the latest version and try again.
- VM starts but is very slow. Check that hardware virtualization (VT-x/AMD-V) is enabled in the VM settings and that the CPU count and RAM are sufficient for the guest OS.
Frequently Asked Questions
Do I need to reinstall the guest OS after moving?
No. The guest OS is stored entirely in the virtual disk, so it moves intact. You may need to reinstall Guest Additions to match the new VirtualBox version, but the OS itself does not need reinstallation.
Can I move a VM from a Windows host to a Linux host?
Yes. VirtualBox VMs are portable across host operating systems. The .ova export/import method is the most reliable for cross-platform moves because it packs everything into a standard file.
What is the difference between .ova and .ovf files?
.ova is a single-file archive that contains the .ovf (Open Virtualization Format) descriptor plus the virtual disk files. .ovf is a set of separate files. When you export in VirtualBox, you get an .ova by default, which is easier to transfer.
Will my snapshots be preserved?
If you use the export/import method, snapshots are flattened into a single disk image — you lose the snapshot history. If you copy the entire VM folder, snapshots are preserved because all snapshot files are included.
How long does the transfer take?
It depends on the size of the virtual disk and the transfer speed. A 10 GB VM over USB 3.0 might take 5-10 minutes; over Wi-Fi, it could take an hour. Export/import also takes time because it compresses the data.
Can I move a VM that is currently running?
No. You must shut it down first. Moving a running VM can corrupt the disk and make the VM unbootable.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.