18

Is it possible to "share" a VirtualBox snapshot? I have a "baseline" VirtualBox machine, and I would like to be able to take a snapshot, and send it to another user which has the same baseline machine.

The scenario is that the baseline machine is used for testing, and I want to allow testers to create snapshots which describe a certain system state, and send that snapshot to developers to further examination.

EDIT: To clarify, I would like to be able to export snapshots "incrementally" without having to export the entire machine as an appliance.

JesperE
  • 1,575
  • 6
  • 14
  • 24

5 Answers5

6

Yes you can. I send vbox snapshots between a laptop and desktop frequently. First you make the snapshot current and then export the entire VM as an appliance.

rogerdpack
  • 2,146
  • 7
  • 32
  • 49
hotei
  • 3,673
  • 2
  • 19
  • 24
  • 1
    I meant if it was possible to export the snapshots incrementally, such that you don't need to transport the entire appliance (which is ~4GB). I will clarify the question. – JesperE Nov 11 '10 at 09:08
  • @JesperE: The snapshot is just a diff between the previous state and the snapshot state. As long as you can keep track of who owns what I think you could apply the snapshots to the base machine just by copying the snapshot file. You'll probably need to keep a backup so you can roll back changes if it blows up but it would be worth trying. I've haven't tried it but it sounds plausible. – hotei Nov 12 '10 at 14:57
  • Yes, but the problem is in "just copying the snapshot file". I tried copying the snapshot file, but it doesn't appear in the UI. – JesperE Nov 13 '10 at 18:13
2

It should be possible to just send the ".vmdk" and ".sav" files that you can find in the Snapshots folder.

However, just copying these files will not make it appear in the VirtualBox GUI. For that, you will also need to edit the ".vbox" file that has all the information about which virtual harddrives belong to which VM's and so on.

Instead of editing your ".vbox" file, the easiest solution would probably be to copy the whole Virtual Machine folder except the really big ".vmdk" file that represents the baseline virtual harddrive. And then plug in this file that you have locally on your machine, anyway.

Jan Rüegg
  • 48
  • 2
  • 9
1

Even Exporting the whole appliance in *.OVA file will not save your snapshots tree, You will et the whole disk overlayed with the latest snapshot the machine was using before exporting.

Montaro
  • 113
  • 5
  • Unfortunately it appears that exporting via OVA file does not export the "Saved RAM state" (i.e. last running state) of the VM, only the VM itself (and disks). And no saved virtualbox snaps either...for reference. – rogerdpack Dec 10 '12 at 16:27
0

I don't know if you can easily do that with VirtualBox snapshots, but if you happen to use ZFS as a storage filesystem for your virtual disks, ZFS allows sending incremental snapshots.

jlliagre
  • 13,899
  • 4
  • 31
  • 48
  • ZFS is pretty cool, yes, but not really a solution to my problem. – JesperE Nov 11 '10 at 18:03
  • Then I assume you aren't using an OS that support ZFS. – jlliagre Nov 11 '10 at 18:53
  • I'm using linux, but I need to be able to send the snapshots to windows machines. And I would prefer not to have to reformat the harddrives of my machine. – JesperE Nov 13 '10 at 18:14
  • Yes, Windows is ruling out ZFS unless you change your architecture to store the snapshots/clones on a ZFS based NAS supplying CIFS shares for Windows. – jlliagre Nov 13 '10 at 21:34
  • Is there an equivalent of `ZFS` for Windows, or is it just a Linux thing? – Kevdog777 Oct 04 '13 at 13:33
  • @Kevdog777 None of the above. There is no equivalent of ZFS for Windows and ZFS is primarily a Solaris thing with ports to FreeBSD, Linux and possibly others OSes. – jlliagre Oct 04 '13 at 22:02
  • ZFS is not aware of VirtualBox instances, clones, and snapshots, so using `zfs send` and `zfs receive` won't update the VirtualBox configuration that keeps track of the snapshot tree. In this case, `zfs send` is no better than `cp` or `rsync`. – Derek Mahar Nov 13 '14 at 16:37
  • @DerekMahar I get your point but one might still substitute the VirtualBox snapshots by ZFS ones instead of mixing both technologies. – jlliagre Nov 13 '14 at 22:49
-1

Appears that with "today's" virtualbox, you can basically just zip up the virtual machine's folder (save it first I guess), then unpack it on another machine, double click on the ".vbox" file and it imports the machine right in, snapshots and all (you may need to remove the VboxAdditions virtual cd image first).

An older option was to use cloning: http://www.i-m-code.com/blog/blog/2012/02/04/virtualbox-clone-snapshots

rogerdpack
  • 2,146
  • 7
  • 32
  • 49