Move a VirtualBox VM


You can build your VMs on one computer and move them to another computer. You don’t need to rebuild your VMs. You might have spent some time setting up your server in a VM, setting up the network and doing all of the necessary configuration, so you don’t want to re-build it. How do you do move it to another computer?

There is an article/post at the website Superuser on “move a VirtualBox VM to another computer“. Here are the three ways. The second way seems to be the preferred way by a few of the commentators on this post, but each way has its own hurdles and gotchas.

  1. Use the Import/Export utility.
  2. Copy the entire virtual machine folder, containing the .vdi and .vbox files.
  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.

Below in the next three paragraphs are some comments from a member at that site.

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.

Copy the entire virtual machine folder, containing the .vdi and .vbox files. This is the preferred option. Make sure that when you copy the VM, you get ALL the files associated with it. You will have issues if certain snapshots and secondary VDI files are in the wrong directory and weren’t copied properly. If you copy all the files and permissions you should not have any problems whatsoever.

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.

How To

For the first method, here are some detailed instructions at this website article at ccm.net.

For the second method, open VirtualBox on the “old” computer and right-click the OS and choose Show in Explorer. You should see something like the following for a Windows 10 VM.

These are the files you will need to copy over. I have not done this yet, so don’t take my word for it, but I would think that you first would copy these over to the new machine into the appropriate folder that VirtualBox would expect them to be in. Next you open VirtualBox on the new computer and create a new VM. Give it a name, select the OS and change the setting from Create a virtual hard disk now to Use an existing virtual hard disk file.