Home VM Tips Hyper-V Snapshots: Overview and Considerations

Hyper-V Snapshots: Overview and Considerations

2023-11-06 | Iris Lee

Table of contents
  • The process of creating a Hyper-V snapshot
  • The relationship between multiple snapshots
  • The application of snapshots
  • The deletion of snapshots
  • Considerations for virtual machine snapshots
  • Protect Hyper-V environment with a professional solution
  • Conclusion
Are you looking for a robust Hyper-V VM backup solution? Try Vinchin Backup & Recovery!↘ Download Free Trial

A virtual machine snapshot is a file-based snapshot of the virtual machine’s state, disk data, and configuration at a specific moment. Multiple snapshots of a virtual machine can be taken, even while it is running. Then, by applying the corresponding snapshot to the virtual machine, it can be restored to any previous state.

Starting from Windows Server 2012, Microsoft officially renamed Hyper-V snapshots to Hyper-V checkpoints. The purpose behind this renaming was to avoid potential confusion between Hyper-V snapshots and VSS (Volume Shadow Copy Service) snapshots used by NTFS file systems.

The process of creating a Hyper-V snapshot

1. The virtual machine is paused (transparent to the user, without noticeable impact).

2. Create an AVHD file for the snapshot (the snapshot is stored as an .avhd file in the same location on the virtual hard disk).

3. Configure the virtual machine.

4. Point the virtual machine’s hard disk to the newly created AVHD file

5. The virtual machine resumes operation (the user does not perceive any modification to the virtual disk configuration).

6. The contents of the memory are saved to disk while the virtual machine is running.

7. After the snapshot is completed, the virtual machine’s configuration and state files are saved in the "snapshot" directory within the virtual machine’s folder.

The relationship between multiple snapshots

When we create Snapshot A, the system simultaneously creates an .avhd file. The changes made to the guest system after Snapshot A is created are actually saved in this .avhd file. In other words, Snapshot A represents a preservation of the virtual machine’s system state prior to creating the snapshot, while the .avhd file serves as the disk we actually use in the "current" state after Snapshot A is created. When creating Snapshot B, this .avhd file will be used as the disk for the snapshot B and also as the parent disk for the "current" state after Snapshot B.

The application of snapshots

The application of snapshots is to restore your virtual machine to a previous state. The process of applying a snapshot is as follows:

1. Copy the configuration files (.bin, .vsv) of the snapshot to be applied.

2. Create a new AVHD file and link it to the parent AVHD (which corresponds to the avhd file of the snapshot being applied).

Note:

1. If you apply a snapshot without taking a new snapshot of the current state beforehand, all operations in the current state will be lost.

2. The "current" state after applying the snapshot and the next-level snapshot of the current snapshot are at the same level.

The deletion of snapshots

1. Delete the virtual machine’s configuration file copy created during snapshot creation.

2. Delete the memory copy created during snapshot creation.

3. Shut down the virtual machine, and the contents of the AVHD are merged into the parent disk. The AVHD file is deleted.

Note:

When deleting a snapshot tree, all child snapshots under that tree will be deleted. If no snapshots within the subtree are applied, the AVHD files of all snapshots in that subtree will be immediately deleted.

Considerations for virtual machine snapshots

In many setups, you may need to recreate different computing environments and replicate various scenarios within those environments. Snapshots can help improve your efficiency in such cases. For example, the scenarios can be software development and testing, technical support services, and training course development.

However, the powerful functionality and flexibility that make snapshots useful and effective in certain setups can lead to unexpected and potentially severe consequences in other setups. These consequences include the inherent risk of data loss if snapshots are not managed correctly. For instance, if editing is done on a virtual hard disk connected to a virtual machine with snapshots, data loss can occur.

Snapshots are appropriately used for development and testing activities, including using virtual machines as staging servers to test updates and patches before deploying them to production servers. It is recommended not to use snapshots on virtual machines that provide time-sensitive services (such as Active Directory services) or when performance or storage space availability is critical.

Additionally, before starting to use snapshots, the following points should also be noted:

  • Taking a snapshot will decrease the performance of the virtual machine(during the snapshot creation process).These snapshots should not be used on virtual machines that serve services in a production environment.

  • It is advised not to use snapshots on virtual machines with fixed virtual hard disks, as these snapshots can reduce the performance benefits that fixed virtual hard disks should provide.

  • Snapshots require sufficient storage space. Snapshots are stored as .avhd files in the same location on the virtual hard disk. Having multiple snapshots can quickly consume a significant amount of storage space. When deleting snapshots using Hyper-V Manager, the snapshots will be removed from the snapshot tree, but the .avhd files will not be deleted until the virtual machine is shut down.

  • Virtual machine snapshots are different from snapshots created by the Volume Shadow Copy Service (VSS). While virtual machine snapshots can be a useful way to create temporary backups of virtual machines, they cannot replace permanent backup solutions.

Protect Hyper-V environment with a professional solution

As it mentioned above, Hyper-V snapshots is a useful way to create temporary backups of VMs, However, they can’t replace real backup solutions. So, to guarantee constant data protection and uninterrupted business performance, it is recommended to backup your critical data and virtual machines with a professional backup and recovery solution.

Vinchin Backup & Recovery is a professional solution which supports data backup of VM like VMware vSphere, Hyper-V, XenServer, XCP-ng, oVirt, RHV, OpenStack, etc. and other data like database, NAS, file server, Linux & Windows Server, etc.

Vinchin Backup & Recovery performs robust Hyper-V backup and recovery functionality including agentless incremental backup, effective data reduction, backup node expansion, offsite backup copy and more, to comprehensively secure Hyper-V environments.

Besides, Vinchin Backup & Recovery can migrate VMs across 10+ virtual platforms including VMware, XenServer, and most KVM-based hypervisors. You can easily switch your critical modern IT workloads from one to another to build your own highly flexible IT infrastructure.

To backup Hyper-V VM, you just need to:

1. Select Hyper-V VM

select Hyper-V VM

2. Select backup storage

Select backup storage

3. Select backup strategies

Select backup strategies

4. Submit the job

Vinchin Backup & Recovery has been selected by thousands of companies and you can also start to use this powerful system with a 60-day full-featured trial! Also, contact us and leave your needs, and then you will receive a solution according to your IT environment.

Conclusion

Hyper-V snapshots are a valuable feature for various scenarios, such as software development, testing, and creating temporary backups. However, it's crucial to manage snapshots properly to avoid potential risks, such as data loss or decreased performance. Understanding the implications and best practices of working with snapshots is essential for efficient and reliable virtual machine management.

To efficiently protect Hyper-V environment, backup solutions are recommended together with snapshots. You can choose Vinchin Backup & Recovery to easily backup and recover your Hyper-V VMs and critical data. Don’t miss the free trial.

Share on:

Categories: VM Tips
You May Also Like...