Synchronize Virtual Machines between Devices

This is for discussing general topics about how to use VirtualBox.
Post Reply
HannesM
Posts: 1
Joined: 3. Nov 2022, 14:12

Synchronize Virtual Machines between Devices

Post by HannesM »

Hello, i work on a few different devices and usually synchronize my Files using OneDrive or a NAS.

Is there a good way to synchronize the a VM (mainly the .vdi disk image), without uploading the Whole disk image each time a change occurs?

I would also be happy about any other Workaround. Ideally i want to Stop my VM on PC1 and Start it on PC2, without waiting for a big Upload in-between. (And be able to also use them offline if necessary)
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Synchronize Virtual Machines between Devices

Post by mpack »

HannesM wrote: Is there a good way to synchronize the a VM (mainly the .vdi disk image), without uploading the whole disk image each time a change occurs?
I'm afraid not, at least not using VirtualBox features.

What would you do if it was two physical PCs that you wanted to keep in sync? Even there it's a big ask. There third party tools that can sync two folder trees and copy only changes, but I don't know that it would be any faster (or safer) than just copying the VM.

Perhaps what you should do what you'd do in the physical world: have two independant PCs (i.e. VMs) and put any shared data in a shared folder, e.g. OneDrive if the sites are different.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Synchronize Virtual Machines between Devices

Post by scottgus1 »

mpack wrote:There are probably third party tools that can sync two files and copy only changes
Rsync can do this, and comes native in Linux, and can be installed on Windows via Cygwin.

However, any tool used to synch the whole VM must do the sync when the VM is fully shot down. Not while running, not while save-stated.

The whole VM folder should be copied, not just the vdi. Any 'hardware' changes or snapshot changes go in the VM's .vbox file, so that file must be brought over too. Snapshots also go in a subfolder of the VM folder. So it's required to bring over the whole folder.

If you don't make any changes to the VM's 'hardware' settings, and you don't use snapshots (better to not use them btw) then the best option is inside-the-VM 3rd-party or host-OS-based synching software. This option can synch the changed data on the fly, and you can run the other VM later and have the synch update locally without having to transfer any VM files.
Post Reply