Hyper-V w2012r2 snapshot/checkpoints corrupted, can't delete them

I am unable to delete snapshots from the Hyper-v manager on a VM where the actual snapshot file has been corrupted. Does anyone have a suggestion on how to remove the snapshot so that can change the save location? I have verified that the actual files have been corrupted in the snapshot location and not accessible.

Thanks in advance
rjs990ctsAsked:
Who is Participating?
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.

Cliff GaliherCommented:
I am not sure what you mean by the "actual snapshot file."   Checkpoints work by stopping writes to the original VHD/VHDX file (so it stays the same from the checkpoint onwards) and new writes are written to a differencing disk (avhd) file.  Since the original file is actually the baseline, it isn't like deleting a checkpoint simply deletes a checkpoint file. Instead, changes made since the checkpoint are merged back into the base file. If the base file is corrupt, it'd be the same as if you didn't have any checkpoints and your live VHD file became corrupt.  The result is a dead VM. Given the limited information provided, I suspect you are in the same boat. Such core corruption will require a restore.  You can't simply remove a checkpoint. It isn't how the architecture works.
0
rjs990ctsAuthor Commented:
Let me clarify, sorry about that. The checkpoint file location in the hyper-V manager was moved from the default (don't ask, too long of a story) and that is the folder that was corrupted and is inaccessible.  

Microsoft-Windows-Hyper-V-VMMS-Admin
Source:        Microsoft-Windows-Hyper-V-VMMS
Date:          3/30/2015 11:05:19 PM
Event ID:      20864
Task Category: None
Level:         Error
Keywords:      
User:          SYSTEM
Computer:      ###############
Description:
Virtual machine failed to generate VHD tree: 'The specified network resource or device is no longer available.'('0x80070037').

The .avhdx files are all intact in the Virtual Hard Disks file in the Hyper-V host and the VM is operational and can be stopped and restarted without issue.
0
rjs990ctsAuthor Commented:
So it basically boils down to the question can the avhdx file be merged into the VHD file without the xml data in the snapshots folder?
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Cliff GaliherCommented:
As I said, AVHD (or avhdx) files are just differencing disks. Even if they are intact, if the root vhd (without the "a") is not available, you are basically out of luck unless you can restore a backup of that file. It is the core, not the avhd.
0
Cliff GaliherCommented:
Regarding your follow-up question, yes if you have access to the original disk and differencing disks, you can merge them manually (although this is currently unsupported, so have backups!)

Hopefully your snapshots were linear and not a complex tree. That's one of the things the XML files track. If your tree is complex, you'll *really* be hard pressed to know which avhd files are part of the branch you want and which are part of a different branch you no longer want.  And there is no good way to even find that information out.

But if the checkpoints were linear, then you can merge them relatively easily.

Stop the VM.
Rename the newest (and only the newest) AVHD to VHD (drop the a, so if they are avhdx files, keep the x.)
In Hyper-V manager, choose to edit disk.  Select your renamed file. Choose to merge with original.
Rinse and repeat with the next avhd (should now be the newest) until no differencing disks are left.

You now have a stable VHD file with all changes merged back in.
0

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
rjs990ctsAuthor Commented:
The VHDX and the AVHDX (Hyper-V on Windows Server 2012) files are intact and the VM is fully operational. The Snapshot folder specified in the Hyper-V manager as the save location was changed and has now been corrupted. I'm assuming that held the data for the snapshot tree. I can't delete the snapshots but was wondering if I could merger the intact AVHDX files into the VHDX . Does a V2V clone merge the AVHDX files into the VHDX?
0
rjs990ctsAuthor Commented:
Thank you Cliff, they are linear and only have 3 AVHDX files and 1 VHDX. and yes backups will be taken.  I am very hesitant to perform any snapshots going further especially due the recommendations of not using them in a production environment. I'll stick with backups.
0
rjs990ctsAuthor Commented:
I was looking at the options in the edit Virtual Disks Wizard.

If you choose the VHDX disk the only options to edit are Compact, Connect, Expand.  if you choose AVHDX differencing file you have options to Compact, Convert, Expand and Merge.

I followed through up to the finish button just to review the process, not complete it.

If selecting the AVHDX file and merge the description is "Merge- The changes stored in a differencing disk into the parent disk or another disk."  I will continue to research this but it initially appears that in the W2012 Gen2 VMs you can easily merge up the chain of snapshots/checkpoints.
0
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
Hyper-V

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.