Maintain and sync a VirtualBox VM between two separate computers
I think that you have two options here: the first one is to set (in the installations of Virtualbox on both computers) the folder where the VMs are stored on some kind of portable or remote hard drive; if the computers that you will be using are linked together on a network, you can use a shared folder, if not, I fear that the only solution is a USB pendrive or an external harddrive. To set the folder, go to File > Preferences > General > Default Machine Folder
. The speed of the USB key could be a limit on the overall performance.
The second solution, that also require a pendrive or something similar (but just to carry around your VM files), is to manually export and import the desired VM every time that you need to carry it away. You can do this by selecting the VM and go with File > Export Appliance
and File > Import Appliance
. By exporting, a file with the .ova format will be created, it is an archive that contains all the files needed to use the VM, by importing it in another installation, you will have the same VM on the second computer. This way you are using the pendrive to simply carry around your files, that when reimported will be stored and accessed from your computer, thus the USB speed is not a concern.
Faced with exactly the same problem and I think I solved it.
Say you have two machines, A and B. Create/prepare your vm in A. After that take a snapshot or create a linked clone (both works, but further steps differ, will give one, you can resolve the other)
Now, make sure that you have a freshly installed Virtualbox in B. Copy ~/.VirtualBox and ~/VirtualBox VMs from A to B with a USB (considering that they are in far away sites)
Now, if you chose the snapshot way, then sync ~/VirtualBox VMs/YourVM/Snapshots folder until it gets big enough. If it gets larger, then create another snapshot in A and copy the YourVM folder to B for once and only sync this new snapshot file in Snapshots folder.
If you take a snapshot or make a linked clone in either A or B, this ritual will be broken, be warned.
Tested in 5.0.20
I know this thread is a year old, but it is a top search result on google for the issue of sharing one VM between two locations.
VirtualBox allows you to remotely connect to a running VM using RDP. If you don't want the VM running continuously, rig some way to launch it remotely.
There is an option for "Allow Multiple Connections", so you wouldn't even have to disconnect from one location before connecting from another.
If you are not able to host your own VM, a quick google search found providers that will host your VirtulaBox images for you.
I've never tried all of this...
I think Sekhemty's answer is the only way to do what you want.
But why does your virtual machine need to be moved? Why not just move your project(s)? Set up your project in a private git and just push and pull as you need it.
Another method to try, if you need to maintain machine consistency and you're changing a lot, would be to use a vagrant and chef/puppet setup. This works by using either a chef(which is a ruby gem) and puppet(I haven't used puppet) to tell vagrant what you want your VM to include and install.
It works by using a script, using chef or puppet, and vagrant reads this script when starting up the VM. If you want anything to be installed just add it to the script and if it's not already there it will be installed when you "vagrant up"! It took me a while to get used to it, steep enough learning curve, but it's very efficient once you get used to it and it will mean you just have to move around a script file instead of a whole VM.
http://red-badger.com/blog/2013/02/21/automating-your-infrastructure-with-vagrant-chef-from-development-to-the-cloud/