Export a VM with the snapshots?

I have a machine with snapshots at different key points in the configuration.
Now I need to back up this VM, with its snapshots, to another machine.

  • I tried the "Export" function, but the .ova file only contain the Current state, no snapshots.
  • Other solution I see is reverting to the first snapshot, export, forward to the next snapshot, export... It would be long, tedious, and heavy.

Is there any ways to take a VM and send it to another computer while preserving the snapshots?


Solution 1:

To copy an entire VM with its snapshots and everything, the only way I know of is by copying the entire folder of the VM. Zipping the folder with 7z will reduce the disk-space to transfer.

If required, the VM with its snapshots can be cloned under another name by:

[right-click] VM -> Clone... -> [button] Next -> [radio button] Full clone -> [radio button] Everything -> [button] Clone

See the article Moving A VirtualBox VM With Snapshots for a detailed write-up.

Solution 2:

The process of copying the full "Virtual VMs" folder from one host to another may be summarized as follows:

Backup: Backup full “c:/Users/oldlogname/Virtual Vms” folder

Restore:

  • Restore full “c:/Users/newlogname/Virtual Vms” folder

  • Edit each “*.vbox-prev” file of each VM, replacing affected paths/lognames

  • Start VirtualBox console in new host

    • Menu: Machine->Add … (each one of the imported VM folder/vmfile)

    • Declare and associate shared folders existing in the old vm host

  • Update “virtualbox additions” to each VM if the host VBox has different version

Enjoy.