Hyper V 2008 R2 snapshot filling up hard drive


I did my first Hyper V installation a couple years ago. After setting up the VM I created a snapshot thinking that it was a way to freeze it in case it messed something up and go back to it. Now - I finally figured out that it created an AVHD and it's been growing in the background for years. Now I have a 600 GB VHD and a 1.6 GB AVHD. There is only one snapshot dated 6/2012. The hard drive it's on only has 60GB of space left on it. The question is: How do I get rid of that snapshot and get the disk space freed back up? I've included a screenshot of the files and the Hyper V screen.



Screenshot of hyper V
Scott NowackiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You should never run snapshots that way in a production environment.  Snapshots are not backups.

Open Hyper-V Manager. Click Start, point to Administrative Tools, and then click Hyper-V Manager.

In the results pane, under Virtual Machines, select a virtual machine. All snapshots associated with that virtual machine are listed in the Snapshots pane.

Right-click a snapshot and then click Apply or Delete Snapshot. Confirm the action in the dialog box that follows.
Scott GorcesterCTOCommented:
I agree with Wayne88 that snapshots should not be used in this vashion, in some environments its not recommended to leave snapshots for more than a day due to slowing performance of the VM's. Simply delete the snaphot and then check that the storage is recovered. In some cases I find that VM files and disks can become orphaned and may need to be manually removed.

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Why are you using Snapshots is the Question ?

They will use up all the storage on your disk, this is by design.

To understand Hyper-V Snapshots further consult this article

Hyper-V Snapshots FAQ
SolarWinds® Network Configuration Manager (NCM)

SolarWinds® Network Configuration Manager brings structure and peace of mind to configuration management. Bulk config deployment, automatic backups, change detection, vulnerability assessments, and config change templates reduce the time needed for repetitive tasks.

Philip ElderTechnical Architect - HA/Compute/StorageCommented:
Is there enough free space left on the disk setup to allow for the creation of a new parent file?

When you delete the snapshot the differencing disk would get merged back into the parent. The end result is Hyper-V creates a new VHD(x) file with the merged content and deletes the differencing disk (AVHD(x)) and the original parent.

Free space is almost always the catch in this situation.

If there is not enough free space to allow the merge to complete the simplest thing to do is to back up the VM, shut it down, delete the VHD(x) and AVHD(x) files, create new VHD(x) files, and bind them to the VM, then restore.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Scott NowackiAuthor Commented:
Thanks for the responses - I'm well aware that snapshots are not the way to go at this point. I'm trying to get this mess cleaned up now that I've gotten myself into it.

Philip - there is only about 50 GB of free space and the VM is over 1 TB.

I was under the impression that I could still just delete the snapshot and the VM would continue to run just fine as it's merged back together. The only other option I have is to move the VHD files to another disk to run this merge. I do have one with much larger disk space available.
Philip ElderTechnical Architect - HA/Compute/StorageCommented:
Since you have storage available: Manually Merge the AVHDX files.

Again, make sure you have a known good backup before proceeding.
Scott NowackiAuthor Commented:
I shut down the VM and exported it to another volume with significantly more space, then I imported that copy into Hyper V and booted it up. Now I'm going to delete the snapshot and shut it down to merge.
Scott NowackiAuthor Commented:
The export and the merge worked. Thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.