Home > Blogs > VMware Fusion Blog

Bonus Tip: Snapshots

People sometimes get confused about how snapshots work and how to use them. While snapshots are incredibly useful for many things, one major misconception is thinking that they are a form of backup – they’re not! If a lightning strike totally fries your computer, a snapshot won’t help if it’s on the same disk (because your snapshot just got fried too). Sure, you’ll probably get lucky – if your computer merely shut down uncleanly, your snapshot may still work. You might not even need to go use the snapshot. But this is not a backup, it’s gambling.

If you want to back up a normal virtual machine, shut down (or suspend) the virtual machine and quit Fusion — you never want to try to read or modify virtual machines when Fusion is working on them. From the Finder, copy the virtual machine to a suitable external drive. Done! If you’re feeling really backup-ful, keep the external drive offsite – this way you’re protected against disasters that affect your entire location (e.g. fire, flood, etc.) A snapshot is better than nothing, but it’s not true backup.

Another common misconception about snapshots is how exactly snapshots are stored (as a corollary, unless you know what you’re doing and understand how snapshots are stored, you don’t want to manually fiddle with snapshots outside of Fusion). When you take a snapshot, Fusion doesn’t create an entirely new copy of your virtual machine; it records the differences since you took the snapshot. This space savings can be quite large: Say you’ve got a 40 GB virtual disk. When you take a snapshot, you probably aren’t expecting to instantly lose another 40 GB of space, which is what an independent copy would require. It would also take quite a bit of time merely to copy the data! If you do want an independent snapshot, make a backup of the virtual machine as described before.

Instead, after taking the snapshot, Fusion writes changes to a different set of files (technical users will recognize these as delta files). However, this also means that you can’t delete the original files and still have a working snapshot – the snapshot is dependent on the originals. If you ever want to revert to the snapshot, Fusion simply gets rid of the delta files. If you ever want to discard the snapshot (but keep the changes), Fusion needs to write the changes back to the original file (Note: you may potentially need as much free space as the original disk).

In the long term, each snapshot can grow up to the size of the original disk, but it’s not an upfront cost. Remember that snapshots can cause a virtual machine to be larger than the size of the virtual disk.

So if snapshots aren’t really for backup, aren’t independent, and can take up a lot of space over time, what are snapshots good for? One answer is quick testing. Say you’ve got a system update but are worried that it might cause a conflict or other problem. You can take a snapshot before installing it; if it does cause problems, you can roll back as if it never happened. This also applies to malware – say a virus infects the guest. If you have a snapshot from before it happened, you can warp back to before it was a problem. As a word of warning, reverting to a snapshot undoes all changes to the virtual disk, including new and modified data you might actually care about.

Reverting to a previous state is something a backup could also solve, but taking a snapshot is quicker (among other things, no need to exit out of Fusion) and smaller (unless you’ve got a fancy block-based differential backup system, in which case it’s the same).

Snapshots are only useful if you have them, though – a snapshot you have is way more useful than one you don’t. To solve the "Darn, I wish I remembered to take a snapshot yesterday!" problem, Fusion 2.0 has a feature called AutoProtect, which lets you set up automatic snapshots. You can choose how many you want to keep and how often they’re taken. Note: The time period is based on elapsed guest time, not real time.

4 thoughts on “Bonus Tip: Snapshots

Leave a Reply

Your email address will not be published. Required fields are marked *