How to Configure Hyper-V Checkpoints on Windows Server 2012 R2
Hyper-V checkpoints (formerly called snapshots) capture the state of a virtual machine at a specific point in time, allowing you to roll back to that state if a subsequent change causes problems. Windows Server 2012 R2 supports two types of checkpoints: Standard Checkpoints (which capture running memory state in addition to disk state) and Production Checkpoints (introduced conceptually in later versions). Understanding when to use checkpoints, how they work internally, and how to manage them responsibly is critical for maintaining VM performance and storage efficiency.
How Checkpoints Work
When a checkpoint is created on a running VM, Hyper-V:
- Pauses the VM momentarily (less than a second with VSS-based checkpoints)
- Creates a differencing VHD/VHDX that captures all future disk writes
- Saves the VM’s memory state to a
.binfile and processor state to a.vsvfile - Resumes the VM
From this point forward, all new disk writes go to the differencing disk rather than the original base disk. The original VHD/VHDX becomes read-only while the checkpoint exists. This is why checkpoints affect disk I/O performance — every write must go through the differencing disk chain.
Prerequisites
- Windows Server 2012 R2 with Hyper-V role
- Sufficient disk space for checkpoint files (differencing disks can grow up to the size of the parent)
- Understanding that checkpoints are not a backup solution
Step 1 — Create a Checkpoint
Via Hyper-V Manager, right-click the VM and select Checkpoint. Via PowerShell:
# Create a checkpoint with a descriptive name:
Checkpoint-VM -Name "WebServer01" -SnapshotName "Pre-Patch-$(Get-Date -Format 'yyyy-MM-dd')"
To create checkpoints on all running VMs before a maintenance window:
$Date = Get-Date -Format "yyyy-MM-dd"
Get-VM | Where-Object { $_.State -eq "Running" } | ForEach-Object {
Checkpoint-VM -Name $_.Name -SnapshotName "Pre-Maintenance-$Date"
Write-Host "Checkpoint created for $($_.Name)"
}
Step 2 — List Checkpoints
# List all checkpoints for a specific VM:
Get-VMCheckpoint -VMName "WebServer01" | Select-Object Name, CreationTime, ParentCheckpointName
# List checkpoints across all VMs:
Get-VM | ForEach-Object {
Get-VMCheckpoint -VMName $_.Name | Select-Object @{N='VM';E={$_.VMName}}, Name, CreationTime
} | Format-Table -AutoSize
Step 3 — Restore a Checkpoint
Restoring a checkpoint reverts the VM to the exact state (memory, processor registers, and disk) captured at the time the checkpoint was created. The VM is stopped before the restore occurs:
# Get the checkpoint object:
$Checkpoint = Get-VMCheckpoint -VMName "WebServer01" -Name "Pre-Patch-2024-05-15"
# Restore to the checkpoint:
Restore-VMCheckpoint -VMCheckpoint $Checkpoint
# Start the VM after restoring:
Start-VM -Name "WebServer01"
Warning: Restoring a checkpoint discards all changes made after the checkpoint was created. For domain-joined VMs, restoring to an old checkpoint can cause Active Directory tombstone issues if the checkpoint is older than the AD tombstone lifetime (default 60 days). Always be cautious with checkpoints on domain controllers or database servers.
Step 4 — Delete a Checkpoint
When a checkpoint is no longer needed, delete it to reclaim disk space. Deleting a checkpoint triggers a background merge of the differencing disk changes back into the parent disk:
# Delete a specific checkpoint:
Remove-VMCheckpoint -VMName "WebServer01" -Name "Pre-Patch-2024-05-15"
# Delete all checkpoints for a VM:
Get-VMCheckpoint -VMName "WebServer01" | Remove-VMCheckpoint
# Delete checkpoints including all child checkpoints in a tree:
Get-VMCheckpoint -VMName "WebServer01" -Name "Pre-Patch-2024-05-15" | Remove-VMCheckpoint -IncludeAllChildSnapshots
The merge process runs in the background while the VM continues operating. Monitor the VM’s status to see when the merge completes:
Get-VM -Name "WebServer01" | Select-Object Name, Status
While merging, the status shows Merging Disks. Do not shut down the host or move the VM until the merge completes.
Step 5 — Understanding Checkpoint Trees
Checkpoints can be nested — you can take a checkpoint of a VM that already has a checkpoint, creating a tree structure. Each branch in the tree is an independent differencing disk chain. When you restore to a checkpoint and then make changes without creating a new checkpoint, you are on a branch that cannot be navigated back to another branch without losing changes:
# View the checkpoint hierarchy:
Get-VMCheckpoint -VMName "WebServer01" | Select-Object Name, Id, ParentCheckpointId, CreationTime | Format-Table -AutoSize
Step 6 — Configure Checkpoint Storage Location
By default, checkpoint files are stored in the same location as the VM configuration files. For performance reasons, especially for VMs with many checkpoints, consider storing checkpoint files on fast SSD storage:
Set-VM -Name "WebServer01" -CheckpointFileLocation "D:CheckpointsWebServer01"
Step 7 — Enable or Disable Checkpoints
In production environments, you may want to disable the ability to create checkpoints for certain VMs (particularly database servers where checkpoint-based rollback is dangerous):
# Disable checkpoints (prevents accidental checkpoint creation):
Set-VM -Name "SQLServer01" -CheckpointType Disabled
# Re-enable standard checkpoints:
Set-VM -Name "SQLServer01" -CheckpointType Standard
Step 8 — Best Practices for Checkpoint Management
Checkpoints are useful tools when managed properly. Follow these guidelines:
- Use checkpoints for short-term rollback only — before patching, installing software, or making configuration changes
- Delete checkpoints within 24-72 hours — leaving checkpoints in place long-term degrades VM performance due to differencing disk chain overhead
- Never rely on checkpoints as a backup — if the base VHD is lost or corrupted, the checkpoint chain is useless
- Avoid checkpoints on domain controllers, SQL servers, and Exchange servers — these applications do not tolerate time rollbacks gracefully
- Monitor checkpoint disk usage — differencing disks can consume significant space if a VM is write-heavy
Monitoring Checkpoint Disk Usage
# Find all AVHD/AVHDX checkpoint disk files and their sizes:
Get-ChildItem -Path "D:VMs" -Recurse -Include "*.avhd","*.avhdx" | Select-Object FullName, @{N='SizeGB';E={[math]::Round($_.Length / 1GB, 2)}}
Summary
Hyper-V checkpoints on Windows Server 2012 R2 are a valuable short-term safety net for administrators performing changes on running VMs. Understanding the internal mechanics — differencing disk chains, memory state capture, and the merge process — helps you use checkpoints effectively and avoid the common pitfalls of leaving long-lived checkpoints on production systems. Establish a checkpoint lifecycle policy: create before changes, verify the change worked, then delete the checkpoint promptly to maintain optimal VM disk performance and prevent storage sprawl.