Do Not Use VMware Snapshot (and AutoProtect) for Backup

VMware and all other virtual platforms do not recommend using VMware Snapshot or AutoProtect Snapshot features to function as VMware backup for virtual machines. The reasoning and alternatives are outlined below. First of all, you need to be aware of what snapshots and the AutoProtect features do and not do, in order to make an informed decision.

What is a VMware Snapshot?

A snapshot in VMware is a mechanism that allows the user of the virtual machine to ‘freeze’ the machine and go back to that frozen state at a later point in time. Naturally, this feature is very popular with software developers and software testers because it allows them to repeat tests with all tests having the exact same defined starting point and system conditions. But how is this done internally? Therein lies the answer as to why you shouldn’t perceive snapshots as a backup mechanism.

VMware implements snapshots by saving the virtual disk and the virtual machine’s internal memory state, among other things, into separate files, so-called snapshot files. For each VMDK (the virtual machine’s hard disk file), for example, and each snapshot you take for the VM, there will be a new VMDK. Once you ‘freeze’ a virtual machine by taking a snapshot of it, VMware stops writing disk changes to the original virtual disk and starts a new virtual disk file instead. After the snapshot is created, the original VMDK remains untouched.

Unfortunately VMware uses a really dumb default setting that most users ignore. It results in splitting VMDK files into 2GB files. A 2 TB virtual disk is hence split into 1,024 files of 2GB size. If you now think that’s really dumb, consider this: If you now go ahead and take two, three snapshots, your VM folder will have well over 3,000 files! And all over sudden, your VM starts becoming really sluggish and you wonder why.

What happens when you restore a VMware Snapshot?

By restoring a VMware snapshot, VMware removes the secondary VMDK where the changes were stored and loads the internal memory and other structures from the previous virtual machine condition. All this information is contained in several snapshot related files. Once the VM is operational again, the snapshot files are deleted.

What happens when you delete a VMware Snapshot?

Deleting a snapshot is a lot more work because now you are telling VMware that you want to keep the changes, which it ‘thought’ was unlikely; hence, VMware needs to merge the original virtual disk with the changes that have occurred since. If a lot of changes were made, this merging could take a while. Once complete, the snapshot files are deleted.

Let me inject here a little thought. The way VMware and other platforms have implemented snapshots is really evidence that they are not meant to be used for backups and not suited on production systems either. If the VMware architects wanted you to use snapshots as a protection mechanism, they would have opted for writing the changes to the original disk and writing the original blocks to a ‘preserve the original’ file.  Thereby there would be no performance impact for subsequent reads or writes, and trashing the snapshot would be very quick and easy. But that’s not how they did it, and they did not for a good reason: the reason is simply that snapshots are not meant to be backups.

Are Snapshots Allowed on Production Systems? No.

Many experienced IT system administrators will be angry if you create snapshots for a production VM because of the inefficiencies and management complexities outlined above. A VM without snapshots might exist of simply two files, the configuration and the VMDK virtual disk. A VM with snapshots can easily consist of dozens to hundreds of files. Naturally all these inefficiencies add up and slow down the server. They make managing the VM data structures too complicated and error prone. It’s best and most efficient not to use VMware snapshots on production system for these reasons.

Why exactly is a VMware Snapshot and the AutoProtect Feature not recommended as a VMware Backup?

Backing up a virtual machine is a much more complete and reliable process than simply taking a snapshot. First of all, snapshots change the VM itself because they introduce new dependencies, whereas a VMware Backup does not. More files are created when a snapshot is added, and VMware starts writing disk changes to different files, etc. If any file gets corrupted or lost, the entire virtual machine becomes damaged. Snapshots are almost always stored on the same disk; hence, a simple disk failure will also affect the snapshot. Nevertheless, even if just a snapshot gets damaged and the original files are OK, in either case the VM is broken.

A VMware backup uses separate storage, ideally somewhere else on a different device or in a cloud account. It protects from all kinds of failures: hardware, software, malware, operating system faults, and accidental or even intentional damage done by disgruntled employees, for example. By taking reliable copies of all bits of information that are needed to restore the virtual machine, the VMware backup contains a complete set of everything that is needed to rebuild the VM on any VMware host, such as the virtual machine configuration, virtual disks, and all snapshots belonging to the VM.

VMware Backup Advantages over Snapshots

An automated live VMware Backup is technically superior and much more reliable than a snapshot. VMware backups can be taken while the VM is running or when it is shut down, either way works without problems. You can restore VMware Backups and the restored VM can be set up to be a clone of the original, so you can compare side-by-side. VMware Backups have no impact on performance once the backup is finished, unlike snapshots which slow down every disk access of the VM once they are created. Another important effect of snapshots is that VMware-internal tracing files are written to disk very often to track snapshot bitmaps and in the case of SSDs, this may lead to faster wear and tear and hence disk failure.

What is the Recommended Strategy?

Snapshots are great for their intended purpose: software and operating system testing. Apart from that, using them is most likely not a good idea, especially on production systems. Important production VMs should be protected by a good VMware backup solution so that you can restore the VM reliably on any host, no matter what happens, without affecting the virtual machine host’s performance in the long term or complicating its management. VMware backup software helps keep the VMware data store lean and efficient, and VMs run at peak performance without overhead. Snapshots affect performance negatively, make storage management more complicated, increase error potential, significantly reduce the number of VMs your host can reliably serve, and are hence not recommended for backup purposes.

Add a Comment

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