8
I've been using VirtualBox on my desktop for quite a while. Having recently bought a notebook, I want to be able to take my Ubuntu virtual machine with me, and have the changes I do on the notebook propagate to the desktop, and vice-versa, when I arrive/leave home. The host operating system is Windows 7 on both computers, running VirtualBox 4.
My first thought was synchronizing the virtual disk files themselves. My tool of choice would be rsync
, more specifically the Cygwin version of it, using the --inplace
option to reduce writes as much as possible. But that would be infeasible: it would stop me from ever working separately on the VMs, because rsync
would have no way to detect conflicts and merge them properly without knowledge of the filesystems that lie inside the containers.
The next option would be rsync
ing the running machines to each other. Would that work without messing up package management? Would I need to do anything manually besides updates like new kernel or drivers? Are there any other solution that could work better?
I think you should split this question in two. First ask about server mirroring. Then when you (hopefully) have a few answers ask how to implement them on a VM. – Nifle – 2011-06-11T07:54:07.430
another possibility would be to have a single instance of the VM on the notebook, and remote access it from the main system when at home. – Journeyman Geek – 2011-06-11T09:38:55.237
You would have to only sync software and documents - not the entire VMs - as you cannot have two machines on the network with the same MAC addresses and hostnames. That would cause mayhem. – paradroid – 2011-06-11T11:45:19.383
@Journeyman Geek: I hadn't thought about that, it could work indeed, but it'd be quite a bit slower considering the hard drive on my notebook crawls in comparison to the SSD on my desktop. – danielkza – 2011-06-12T04:11:09.490
@paradroid: The MAC address would be determined by the VM settings, which I would not sync. Hostname could be a problem, which I had not considered. I guess selectively choosing what to sync would cause me less trouble. – danielkza – 2011-06-12T04:14:00.677
1Is there a reason you don't run the VM on an external drive and move it from system to system? – Dave M – 2012-03-13T18:27:10.127