is it safe to delete the snapshots of a vm in hyperv ?

got server 2021 hyperv
got a virtual machine in it.

recently saw the hyperv space is getting filled up fast. found avhdx files are created by snapshots.
my understanding snapshots are to go back if needed. so if i dont need those snapshots, can i just simply delelte to free up some space. or deleting it- will craete any data loss with my current virtual machine ?
have also attached a pic of it      snapshot.PNG
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Jackie Man IT Manager
Top Expert 2010

Commented:
Post a screenshot of how much free space you have.

Deleting snapshot means the snapshots avhdx file will be merged with existing vhdx and you need enough free space before your snapshot can be merged. If you do not have enough free space, do not delete the snapshot as if your free space is below the threshold (5% for ">10TB disks" to 15% for "1TB disks"), your hyperv vm will be crashed.

Author

Commented:
hi, have attached a screenshot of the sizes.
and got only 45 gb free space in hyperv now.
avhdx.png
virtual machine 1 - 219 gb and its ahvdx file is about 125 gb
virtual machine 2 - 215 gb and its ahvdx file is about 97 gb
Jackie Man IT Manager
Top Expert 2010

Commented:
You do not have enough free space.

Do not delete the snapshot.

Besides, there will be data loss if you directly delete the ahvdx file instead of the snapshot.

You have two options to handle this problem.

The first method is to live migrate to another hyperv host.

and the other method is get a larger storage, shutdown the vm and export the vm to the larger storage and delete the snapshot.
Philip ElderTechnical Architect - HA/Compute/Storage

Commented:
The delete process merges the differencing disk, .AVHDX, into a new parent file. That new parent file gets created before the old one is deleted.

So, one needs to have at least enough free space to create that new parent.

Are the backups test restored thus known good?

If they are, then shut down the VM2, back it up, delete the VM and its .VHDX and .AVHDX files.

Create a new VM and restore into that shell.

Once complete, you will have enough free space to delete the snapshot on VM1 which will initiate the merge.

Don't use snapshots.

Don't use snapshots.

And, I will repeat it again: Don't use snapshots. Use backup to keep things safe!

I have two very thorough EE articles on all things Hyper-V:

Some Hyper-V Hardware and Software Best Practices
Practical Hyper-V Performance Expectations

Author

Commented:
hi, I just checked my manager and he told to delete the check point.
I just did both checkpoints, and it merged and it’s all good now.
no issues
Commented:
deleted the checkpoints , it merged with vm without any issues. freed up space in hyperv as well.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial