2013
12.02

You might have heard that WS2012 R2 Hyper-V changed how it performs backups of virtual machines but not heard how.  I’ll give you a glimpse of what that change was in this post.

First some terminology:

  • Volume Shadow Copy Service (VSS) Snapshot: VSS performs a snapshot of a volume to get a consistent backup of a file or files/folders.
  • Checkpoint: Formerly known as a (Hyper-V) snapshot, a checkpoint (matching the SCVMM term) creates a crash consistent copy of a VM at a point in time, using AVHD or AVHDX files that are linked to a parent VHD or VHDX file – or linked to a parent AVHD or AVHDX files in the case of nested checkpoints.

In the past, VSS is used to create a VSS snapshot of the volume(s) containing the files of a VM that is to be backed up.  The snapshot was mounted and the required files (identified by the Hyper-V Writer) were backed up.  The process was pretty complex and could lead to problems for some customers.  The quality of storage hardware VSS writers had too much impact on the process.  Once you have a pretty clean environment (network/storage design, patching, drivers and firmware), backup was the one problem that could hurt.  CSV 2.0 sorted out most of that, but Microsoft wanted to simplify the backup process.

Thanks to live merging of checkpoints (snapshots) that was added in WS2012, and the experience Microsoft has gained by using checkpoints (snapshots) for other features (such as Hyper-V Replica), WS2012 R2 Hyper-V has switched to using checkpoints instead of VSS snapshots.

Now a checkpoint is created of every virtual machine that is to be backed up.  Writes are temporarily redirected to the checkpoint’s AVHDX/AHVD file(s).  This gives the backup requestor a clean & crash consistent copy of the virtual machine’s VHD or VHDX files that are safe to read.    After the backup, the checkpoint is merged and the job is done.

Note: You might notice that a VSS snapshot is still taken of the relevant volume(s).

We’ve moved from application consistent backup to the next (small) step down with a crash consistent backup.  This isn’t a big deal – not for backup experts anyway.  For products like SQL Server or Exchange, restoring this VM is like someone reset the VM.  The restored database starts up, does a quick cleanup, and carries on operating as it did before the backup operation.  In return, we get a much simpler backup process that should prove to be more resilient and selective.

8 comments so far

Add Your Comment
  1. Thanks Aidan,

    That’s interesting, I’m still having problems backing up on WS2012.

    Should “WS2012 Hyper-V has switched to using checkpoints instead of VSS snapshots” read “WS2012R2 …”

    Tim

    • Changed. THanks.

  2. Is this a possible workaround to backup Lotus Domino servers?

    • The last I looked, Lotus were unaware that virtualization exists. They’re worse than Exchange, and that’s saying something. You’ll have to take it up with them. If crash consistent is good enough for Domino to recover, then it might be.

  3. I agree that moving away from VSS hardware provider on HOST is good ( having support where a VSS hardware provider is involved ) is a nightmare i wonder why do not use VSS on guest OS so that Exchange and SQL and any other VSS aware app can do their work to have application consistency.

    • You say “YOU” … I do not work for Microsoft.

  4. Thanks for the explanation! After having read many articles about Windows Server Backup and Hyper-V as far as I understand in order to be able to restore individual files from a backup (without having to restore complete VMs) I have to run WSB from inside my guest VMs. Additionally, Server 2012 R2 Essentials offers a wonderful capability to back up client computers. I suppose to use this feature I really need to perform those client backups from the Guest VM (running Server Essentials). So if I want to store those client backups locally on my server where is the recommended place to put those client backups? I suppose a pass-through disk attached to my Guest VM would be the best. Or do you still recommend to store backups inside a virtual hard disk (VHDX)? In the latter case I would have VHDX files (created by WBS) inside a VHDX. This is probably not recommended for performance reasons etc. Thanks for any recommendation.

  5. What is the following for?
    “Note: You might notice that a VSS snapshot is still taken of the relevant volume(s).”

Get Adobe Flash player