Blogs about software development and internet technologies | facebook auto share app | print cookie


Easily Backup Virtualbox disks using Immutable Images

Virtual disks (Virtualbox in our case) are very large files, that may change frequently. This is a big problem for backup. A little change (even a simple boot of virtual machine) may cause a 20 GB file to be stored twice during backup process.

The use of an incremental backup solution (eg rdiff-backup) could theoretically be an option, but may cause serious delays in the restore process for such a large file.

A good solution is to use immutable disks. When a virtual disk marked as immutable, practically becomes read-only and any differences will be stored in differencing disks. After shutdown of virtual machine, differencing disks are reset (not deleted), and any changes are lost. If this is not desired, you may turn off autoreset flag:

VBoxManage modifyhd <uuid> | <filename>-autoreset off

So, if you use the virtual machine only for software testing, after virtual machine setup with all necessary software and system updates, mark the disc as immutable.

When a major upgrade is necessary (either Virtualbox upgrade, or guest operating system update or guest software update), mark virtual disk as normal, perform the upgrade and then mark disk as immutable again.

The various differencing disks stored in the folder Snapshots, can either be ignored by the backup process, or simply deleted after shutdown and before the backup. Preferably from Virtual Media manager (Release → Remove)

Immutable virtual disks

In order to mark a disk as immutable, you should Release it from Virtual Media Manager. After mark the disk as immutable you should Attach it again to the virtual machine (from virtual machine Settings).


Be sure you have a backup of your virtual disks, before you make any changes!



Sign-up for our free email newsletter. Get updates when new tutorials and tips are published. You can unsubscribe anytime with a click.

Your comments are welcomed!

This site actively encourages commenting on any post. Comments are not pre-moderated, but this community does not tolerate direct or indirect attacks, name-calling or insults. Please, read terms of use and Comment Policy at privacy policy.

More tips