Sergey Nivens - Fotolia
Point-in-time VM configuration snapshots have saved Hyper-V administrators a lot of headaches, and now they have an additional option for saving VM states. Originally called snapshots, Microsoft rechristened this feature as checkpoints in Windows Server 2012 R2. The latest version of Windows, Windows Server 2016, offers two types of Hyper-V checkpoints: the standard checkpoint and the production checkpoint.
Two types of Hyper-V checkpoints
Although both standard and production checkpoints create a point-in-time image of a VM, the two features rely on different technologies. Standard checkpoints save a VM and then create the point-in-time image, much like snapshots in earlier versions of Hyper-V did. Production checkpoints use backup technology, using the Integration Services feature to take a point-in-time image of a VM. For VMs that run a Windows OS, production checkpoints use Volume Shadow Copy Service (VSS) technology; for VMs that run a Linux distribution, production checkpoints flush the file system buffers to create a consistent VM image.
Which checkpoint should you use?
Since there are two types of Hyper-V checkpoints available in Windows Server 2016, it's imperative to understand the differences between standard and production checkpoints and weigh these differences when deciding which to use. It's important to understand that when you process a standard checkpoint for a VM, Hyper-V captures the disk and memory state of the VM and the configuration is restored to the exact moment that you applied the standard checkpoint. Apart from capturing the disk configuration, standard checkpoints also capture the memory state; this includes transactions still being processed by applications running inside the VM. When you use a production checkpoint, Hyper-V utilizes VSS to create a data-consistent storage image, but never takes a snapshot of the memory state of the VM.
Standard checkpoints can be useful for VMs used specifically for development and testing purposes, but not for VMs that keep transactions in memory. Since the restore process also restores memory configuration, applications that use memory data to process transactions might not be able to process the changes if you choose a standard checkpoint. If you use a production checkpoint, any applications running inside the VM will behave correctly and can handle the changes because it invokes the VSS restore operation. For example, when restoring a production checkpoint for a VM that runs SQL and Exchange applications, the applications will be able to cope with the changes normally.
Enabling and creating checkpoints
You can use both the Hyper-V Manager user interface and PowerShell to enable and create checkpoints. From the Hyper-V Manager, right-click on the VM for which you want to enable the checkpoint, then click on Settings. Under Management, select Checkpoints, and then click the Enable Checkpoints checkbox to enable the checkpoint.
As you can see in Figure A, you can select production checkpoints or standard checkpoints. If your production checkpoint should fail and you need to create a standard checkpoint to replace it, select the checkbox next to "Create standard checkpoints if it's not possible to create a production checkpoint."
Note that new VMs created in Windows Server 2016 Hyper-V use production checkpoints as the default.
To create a checkpoint, simply right-click on the VM, then click Checkpoint to allow Hyper-V to create a checkpoint. Once the checkpoint has been created, Hyper-V will show a message indicating the checkpoint was created successfully, as shown in the Figure B.
If you need to use PowerShell to enable, disable or create Hyper-V checkpoints, use the following Set-VM PowerShell cmdlets:
To enable or disable a checkpoint for a VM, execute Set-VM –Name VM1 –CheckPointType Enable to enable the checkpoint and Set-VM –Name VM1 –CheckPointType Disable to disable the checkpoint.
To configure a VM to use only production checkpoints, use the Set-VM –Name VM2 –CheckPointType ProductionOnly command. To ensure Hyper-V can switch to a standard checkpoint if the production checkpoint fails, use the Set-VM –Name VM2 –CheckPointType Production PowerShell command.
To be able to create a checkpoint using PowerShell, you will use the CheckPoint-VM PowerShell cmdlet -- just execute CheckPoint-VM –Name VM1 to allow Hyper-V to create a checkpoint.
Depending on the state of the VM, you can configure and create a checkpoint. For running VMs that have Integration Services installed, you can use both production and standard checkpoints, but VMs that don't have Integration Services can only use a standard checkpoint.
There is no difference between a production and standard checkpoint if the checkpoint is processed for an offline VM.
Although Hyper-V checkpoints provide an easy way to revert the configuration of a VM to a previous state, you should use production checkpoints only for noncritical virtualized workloads or for test and development VMs.
Microsoft adapts to the develop-friendly world
Changes to Windows Server licensing affect enterprises
What's new in Windows Server 2016 Hyper-V?