Move VirtualBox Virtual Machine: Full Guide
Yes, you can move a VirtualBox virtual machine to another folder or another computer, and the process is straightforward if you do it correctly. This article explains the safe way to move a VM, what to do about snapshots and shared folders, and how to avoid the common “Inaccessible” error.
Why Move a VirtualBox VM?
People move a VirtualBox VM for several reasons:
- Free up space on a small system drive by moving the VM to a larger secondary drive or external disk.
- Transfer a VM to a new computer without reinstalling the guest operating system.
- Organize VMs into a dedicated folder structure (e.g., by project or date).
- Move a VM to a faster SSD or NVMe drive for better performance.
Whatever your reason, the key is to move the entire VM folder—not just the .vdi disk file—so that all configuration files and snapshots move together.
What Files Make Up a VirtualBox VM?
Each VM in VirtualBox is a folder containing several essential files. Knowing these helps you understand what to move:
- .vbox – The main configuration file (XML) that defines the VM’s hardware settings, storage, and network.
- .vdi – The virtual disk file(s) containing the guest operating system and data.
- .vbox-prev – A backup of the previous configuration (used for recovery).
- Snapshots/ – A subfolder containing snapshot files (.sav and .vdi) if you have taken any.
- Logs/ – Log files for debugging (not essential to move).
If you only move the .vdi file and leave the .vbox behind, VirtualBox will lose track of the VM. Always move the whole folder.
How to Move a VirtualBox VM (Step-by-Step)
There are two main methods: using VirtualBox’s built-in “Move” feature (recommended) or manually moving the folder. Both are explained below.
Method 1: Using VirtualBox’s Move Feature
- Open VirtualBox and ensure the VM is powered off (not saved or paused).
- Right-click the VM in the left panel and select Move… (or go to File > Move…).
- In the dialog, choose a new folder location (e.g.,
D:\VMs\MyVM). - Click Move. VirtualBox will move all files and update the configuration automatically.
- After the move, the VM appears in the list with the new path. Start it to verify it works.
This method is safe because VirtualBox handles all file references and updates the .vbox file internally.
Method 2: Manual Move (When You Need More Control)
- Power off the VM completely.
- Close VirtualBox entirely (including the tray icon on Windows).
- Cut and paste the entire VM folder to the new location using your file manager.
- Reopen VirtualBox. The VM will show as “Inaccessible” because the path changed.
- Right-click the VM and choose Remove… (but do not select “Delete files”).
- Then go to Machine > Add… and browse to the .vbox file in the new location.
- VirtualBox will re-register the VM with the new path.
This manual method works, but it’s easy to accidentally delete files if you choose the wrong option. The built-in Move feature is safer.
What About Snapshots?
Snapshots are stored in the Snapshots subfolder of the VM directory. When you move the entire folder, snapshots move with it automatically. However, there are a few things to keep in mind:
- If you have snapshots, the .vdi files are split into base and delta files. Moving the whole folder preserves this structure.
- If you move only the base .vdi and leave the snapshots behind, the VM will fail to start.
- If you plan to move the VM to a different host, consider deleting old snapshots first to reduce size and avoid compatibility issues.
Common Problems and How to Fix Them
After moving a VM, you might encounter these issues:
- “Inaccessible” error: This usually means the .vbox file path is broken. Re-register the VM as described in Method 2.
- Missing disk: If the .vdi file is not in the same folder as the .vbox, VirtualBox can’t find it. Keep all files together.
- Permission errors: On Linux or macOS, ensure the new folder has read/write permissions for your user.
- Network adapter changes: On a new host, the VM may get a different MAC address. If you need the same IP, set the MAC address manually in the VM settings.
- Shared folders break: Shared folder paths are absolute. After moving the VM, update them in Settings > Shared Folders to point to the new host paths.
Moving Between Different Computers
Moving a VM to another computer is similar, but there are extra considerations:
- Copy the entire VM folder to an external drive or network location.
- On the new computer, install VirtualBox (same or newer version) and add the VM via Machine > Add.
- If the new computer has different hardware (e.g., different CPU), the guest OS may need re-activation or driver updates.
- For Windows guests, you may need to repair the boot loader if the disk controller type changes (IDE vs. SATA).
To avoid hardware-specific issues, consider using the Export Appliance feature (File > Export Appliance) which packages the VM into an OVA file. This is more portable but takes longer and may compress the disk.
Should You Use Export/Import Instead?
Export/Import (OVA/OVF) is an alternative to moving the folder. It creates a single file that can be transferred easily. However, it has trade-offs:
- Pros: Guarantees a clean copy, allows you to change settings during import, and reduces file size if you compress.
- Cons: Takes time to export/import, may lose snapshots (they are not exported by default), and can cause disk format changes.
For a simple move within the same computer, the Move feature is faster and preserves everything. For transferring to another machine, Export/Import is often more reliable.
Frequently Asked Questions
Can I move a VM while it is running?
No. You must power off the VM completely before moving it. Moving a running VM can corrupt the disk and configuration files.
What if I only want to move the virtual disk (.vdi) to another drive?
You can use the File > Virtual Media Manager to move a disk independently. Select the disk, click Move, and choose a new location. Then update the VM’s storage settings to point to the new path.
Will moving a VM change its MAC address?
No, moving the folder does not change the MAC address. However, if you export/import, the MAC address may change unless you specify otherwise. If you need a fixed IP based on MAC, set it manually after moving.
How do I move a VM from Windows to Linux (or vice versa)?
Copy the entire VM folder to the new OS. On the new host, add the VM via Machine > Add. The guest OS will run, but you may need to install guest additions for the new host and possibly adjust hardware settings.
Can I move a VM to an external USB drive?
Yes, you can move a VM to an external drive and run it from there. However, USB drives are slower than internal drives, and some USB drives may not support large files (FAT32 has a 4GB limit). Use NTFS or exFAT for large VMs.
Why does my VM show “Inaccessible” after moving?
This happens because the .vbox file still points to the old path. Re-register the VM by removing it (without deleting files) and adding it again from the new location.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.