Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a VirtualBox VM that has a project I'm working on. I'd like to be able to use this VM on two separate computers, so I can work on it where I happen to be at that time. I've seen answers on transferring, cloning, and backing up VMs, but nothing on having two copies and keeping them in sync.

What's the easiest (fewest or simplest steps) or best (lowest risk of problems) way to maintain a single VM image on multiple computers?

Ideally, I'd rather not run the VM from a USB drive as one of the two computers has very few USB ports, but if that's going to be best, then I'll take it (I'm actually not sure if there are any problems with running a VM from a USB drive). I would, however, plan on using a USB drive to transfer any files between computers.

share|improve this question

3 Answers 3

up vote 4 down vote accepted

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.

share|improve this answer

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 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 alot, 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/

share|improve this answer
    
It's not just about the code (which does go into a repository) and configuration; it's because the VM is my development environment. I started using VirtualBox so I could work in Ubuntu on a computer running Windows. This would give me a consistent development environment when it's less convenient to move the environment than it would be to move a copy of it. –  rsgoheen Apr 29 '13 at 15:59
    
Well then vagrant and chef/puppet seems like it's the best. That way if you need to change something in your dev environment, there's no need to export and import your VM, you just add what you installed to your script and vagrant will build it into your VM on start up. It's very handy for having different instances of dev builds as well, as vagrant works off a "base-box(OS)" and builds on top of that what the script tells it too, so you could have multiple testing environments but only using the space of one. –  boundless08 Apr 29 '13 at 16:29

You could rsync the virtual machine images between your two computers.

share|improve this answer
    
A bit more detail would make this a better answer. Can you elaborate? –  Dave M Sep 20 '13 at 20:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.