3

Can you track changes to a VirtualBox disk using a VCS like Git? If not what is a good way to use version control to track changes while configuring virtual servers.

**I understand that git doesn't track binary blobs very well.

I would like to mount the VirtualBox drive and track changes from the root. The only time I would have to worry about binary blobs would be the initial git commit and any git commit after I update a piece of software.

T. Thomas
  • 187
  • 5
  • VCSes usually intender for tracking source files, i.e. small text files, not huge binary data. VirtualBox on the other hand could create snapshots of disk images. – Alexey Ten Dec 23 '14 at 07:24

1 Answers1

8

You are much better off tracking changes inside the machine, as git etc. won't work very well with a large binary blob like a VM disk image.

To be able to roll back to another state, snapshots are an excellent solution, but they have a performance impact.

The best method (IMHO) is to use a configuration management tool (e.g. Puppet) and track the changes of it's config files.

Sven
  • 97,248
  • 13
  • 177
  • 225
  • What if I was to mount the VM disk and track changes (Using Git) for the entire root directory? – T. Thomas Dec 24 '14 at 00:27
  • I ended up using ansible, but this answer put me down the right rabbit hole. Lots of options, its best to DYOR and find one that works with your dev style. – T. Thomas May 21 '20 at 18:21