Checkpoints also known as Snapshots in previous versions of Windows Server are a mechanism for capturing a state of a virtual machine, make some changes and then have the ability to roll-back to that previously saved state. Microsoft planned for IT to use Checkpoints in test, development or lab environments, however Checkpoints were being used within real live production environments. Prior to Windows Server 2016 this was absolutely not recommended or supported!
Previous versions of Windows Server Hyper-V used .XML based files to represent VM Memory and the state of VM Devices respectively at the time of the Checkpoint. So not be confused with Production files, these Checkpoint specific files were be stored within a separate Checkpoint File Location. New to Windows Server 2016, Microsoft has now deprecated the .XML file format and have since introduced .VMCX and .VMRS file format. The last portion of the checkpoint architecture is the differencing disk that’s used. This differencing disk follows the .AVHD(x) file format and is stored in the same directory as the Production .VHD(X) file is stored. While the Checkpoint is open all writes that occur are captured within this differencing hard disk. At the time of replay the VM is powered off, the blocks of data are merged to the production .VHD(X) and the VM is brought back online.
Why were checkpoints not supported in Production?!? Well it’s quite simple. Standard Checkpoints captured the disk and memory state of the VM – either fortunately or unfortunately – this did included any transactions that still might have been in-flight. Transactional based applications like Active Directory, SQL Server or Exchange would be extremely unhappy when this Checkpoint was reverted to.
Production Snapshots are much different, they leverage in Windows based operating systems the Volume Shadow Service (VSS) to quiesce those transactional applications previously mentioned. Linux based OS’ are supported too, they are instructed to flush the file system buffers to create a file system consistent checkpoint. Whenever a Production Checkpoint is initiated through Hyper-V Manager you receive a notification stating that a Production Checkpoint was successfully created.
By default, any VMs created on Windows 10 or Windows Server 2016 (Now TP4) have Production Checkpoints enable by default. However it’s easy to switch between through the GUI or via Powershell.
To change between types of checkpoints:
- Right click on the VM, choose Settings.
- Within the Management pane, choose Checkpoints
- Click either Production or Standard Checkpoints.
|Set-VM -Name VM_Name -CheckpointType Disabled
Set-VM -Name VM_Name -CheckpointType Production
Set-VM -Name VM_Name -CheckpointType ProductionOnly
Set-VM -Name VM_Name -CheckpointType Standard
When reverting to checkpoints Standard and Production Checkpoints produce different behaviors. Standard Checkpoints revert to the exact moment in time of the Checkpoint. To put it simply, if you had Internet Explorer open with 10 tabs and decided to take a Checkpoint, when that VM reverts, IE will have those same 10 tabs open.
Production Checkpoints, since using VSS are consistent and look and feel as though the VM and Operating System were shutdown and brought backup cleanly….just like a backup, but it’s not a backup 🙂
Ben Armstrong, aka VirtualPCGuy and all things Hyper-V at Microsoft publicly states that Production Checkpoints are supported on any Enterprise Application!