What's the recommended way to move a VirtualBox VM to another computer?

Well done for doing your research. I regularly use all three options.

  1. (Use the “Import/Export utility”). This is the easiest because it combines the whole VM into a single file and transfers it over without issue pretty much every time. However, in my experience when creating the OVA or OVF file for export it throws away all snapshots and if done incorrectly can result in a VMDK file. When you re-import the VM you should be able to select what type of HDD file you want created, VDI or VMDK.

  2. (Copy the entire virtual machine folder, containing the .vdi and .vbox files). This is my preferred option and although I have had to edit the XML file a few times it's been my own fault for messing something up. Make sure that when you copy the VM, you get ALL the files associated with it. The issues I ran into were when certain snapshots and secondary VDI files were in the wrong directory and weren't copied properly. If you copy all the files (and permissions) you should not have any problems whatsoever.

  3. (Clone the VDI using “Virtual Media Manager” and then recreate a VM on the target machine but using the cloned VDI as the hard disk). This is less desirable because then you have 2 copies of a VM, and it can cause licensing issues, network issues, etc, depending on how you clone the VDI file.

In summary, I would definitely recommend option 2, just make sure you get all the needed files when you move it over.


Method 2 works well now (with VirtualBox 4.0 and higher), without any XML modification required:

  1. Stop your Virtual Machine
  2. Exit VirtualBox
  3. Copy the VM folder to the new location
  4. Restart VirtualBox, and delete the old VM.
  5. Go to Machine menu ≥ Add and browse to your new location.

That's it!

ps: I have VirtualBox 4.3.20 on OSX 10.10

See this VirtualBox forum post for more details.


My preferred option is option 2 as well:

  1. Copy the entire VM folder, containing the .vdi and .vbox files.

But sometimes a UUID mismatch will happen. Often this happens if you just copy the VDI disk image of one machine into another machine but I have had it happen during straight copies of full directories as well.

So, if this is the message you get after moving the virtual machine and trying to start it up in the new setup:

Failed to open the hard disk .

Cannot register the hard disk becuase a hard disk with UUID already exists.

Just go into the directory of your virtual machine; of course change the actual path to match the actual path you are going into:

cd /full/path/to/virtualbox/virtualmachine/Sandbox

And run this command to assign the disk a new UUID:

VBoxManage internalcommands sethduuid Sandbox.vdi

In case anyone else is looking for an answer to this I successfully moved 5 Virtual Box VMs to another Win7 install on a new hard drive on the same machine (essentially a move from one guest OS to another on the same PC). I realise that drivers on a completely new machine would probably vary and potentially have a negative effect on the move but I've documented the process below in the hope that it may help someone.

  • There was no requirement to clone VMs or alter the xml file. VB version was fairly current: 4.3.12r93773.
  • New copies of VMs were created in a new folder/shared drive to retain existing/old VMs intact. I can still boot from the old hard drive which I've retained for redundancy/issue resolution until I'm happy with my new setup; so I can access the old VMs in their former state if necessary.
  • Drive letters will vary/may not be necessary depending on your setup.

On Old Win7 Host:

  1. Ensure all VMs are powered off.

On New Win7 Host:

  1. Create new folder called X:\NewVMs\VirtualBox VMs (from New Win7 machine to ensure permissions OK)
  2. Copy/Paste (don’t drag) all VMs and related folder contents from the old folder to this folder (uses new permissions)
  3. Uninstall VirtualBox (if installed)
  4. Delete .virtualbox folder and all contents (if existing)
  5. REBOOT to confirm no program files or registry entries remaining (if uninstalling old VirtualBox).
  6. Install/Re-install VirtualBox (ensure you’re using the same version as the VirtualBox on which VMs were created on old host/machine (in my case ver. 4.3.12r93773))
    IMPORTANT: (Don’t select tickbox to open/run VirtualBox at end of installation)
  7. Copy/paste (don’t drag) .virtualbox folder and contents from Old Win7 Host (usually C:\Users[username].VirtualBox
  8. Now open VirtualBox
  9. Set preferences for new Default VM creation folder to the same file path as the newly created VirtualBox VMs folder: X:\NewVMs\VirtualBox VMs
  10. Test status of VMs

Good luck.