kjekol - Fotolia

Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Application awareness comes to hypervisor snapshots

Brien Posey discusses why hypervisor-based snapshots can cause problems when they're applied to application servers and how application awareness can mitigate the issue.

Hypervisor snapshots are great for protecting virtual machines against potentially risky operations. For example, some administrators will create a snapshot prior to applying an operating system patch. That way, if the patching operation causes problems, the virtual machine can be rolled back to its pre-patch state.

Although hypervisor snapshots can be tremendously beneficial, they are not without issue. Snapshots can be extremely problematic when applied to application servers. In fact, some of Microsoft's application support policies specifically prohibit the use of hypervisor snapshots.

Application awareness is evolving to the point where it can mitigate these problems, but before we talk about how that works, let's take a step back.

To see why snapshots can cause problems with applications, it is necessary to understand the way that snapshots work. Hypervisor snapshots are usually based on differencing disks. A differencing disk is a virtual hard disk that has a parent-child relationship with another VHD. When a snapshot of a virtual machine (VM) is created, its VHD becomes read-only. A differencing disk is created and all write operations are directed to it. This ensures that the original VHD remains in a pristine state. If it becomes necessary to roll back the VM, the differencing disk is deleted and write operations are redirected to the original VHD. The VM now exists exactly as it did at the time that the snapshot was created.

There are a number of reasons why snapshots can be troublesome for applications. Some hypervisors, for example, create differencing disk snapshots but ignore the contents of the VM's memory and virtual CPU. If this type of snapshot were made against a running application server, applying the snapshot would inevitably result in data loss since the memory contents are not preserved. Even if a hypervisor did include the memory and CPU contents in the snapshot (which some do), making a snapshot of a running application server can still be problematic.

To give you a more concrete example, imagine what would happen if you made a snapshot of an Exchange mailbox server. Applying the snapshot could have all sorts of side effects. Messages that were in the message queues at the time that the snapshot was made would be redelivered. Transaction logs that had accumulated since the time of the snapshot would be erased, as would any messages, calendar entries, contacts or tasks that had been added to the mailbox database. If any new mailboxes were created, there could potentially be a mismatch between the Active Directory and the mailbox database as a result of applying the snapshot.

These are just a few of the ways that applying a snapshot to an Exchange Server could potentially cause problems. The problems that may occur depend on the server roles, the Exchange Server version and the snapshot mechanism. Thankfully, these types of problems may soon be a thing of the past. The next big evolution in hypervisor snapshots is application awareness.

Microsoft will be introducing a feature called Production Checkpoint in the next version of Hyper-V. When a snapshot (or checkpoint, as Microsoft likes to call it) is created, Hyper-V will invoke Volume Shadow Copy Services (VSS), which is the same mechanism that is used to create application-aware backups. Although there isn't a lot of specific information available at this point, Microsoft has revealed that VSS will be used to put the machine into an application-consistent state as a part of the checkpoint process. This will effectively eliminate concerns about application consistency in the event that the checkpoint is applied.

Some have expressed concern that VSS will slow down the checkpoint process because of the tasks that have to be performed in order to establish application consistency. It is worth noting however, that application consistency eliminates the need for memory and CPU-state data to be retained within the checkpoint. This will help to offset some of the required overhead.

Even though VSS is a technology for backing up Windows servers, Linux servers will also be able to benefit from production checkpoints. Rather than using VSS, Hyper-V will use a buffer-flushing technique to place Linux VMs into a consistent state.

Application awareness is sure to make hypervisor snapshots more useful. In the future, rolling back a snapshot will produce results similar to the results of restoring a backup, but without incurring the long recovery time.

About the author:
Brien M. Posey, MCSE, has received Microsoft's MVP award for Exchange Server, Windows Server and Internet Information Server. Brien has served as CIO for a nationwide chain of hospitals and has been responsible for the Department of Information Management at Fort Knox. Visit Brien's personal website here.

Next Steps

Increase productivity through app-aware backups

Is application awareness in cloud networking real?

Dig Deeper on Disk-based backup

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.