Link to home
Start Free TrialLog in
Avatar of rjs990cts
rjs990cts

asked on

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
Avatar of Cliff Galiher
Cliff Galiher
Flag of United States of America image

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.
Avatar of rjs990cts
rjs990cts

ASKER

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.
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?
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.
ASKER CERTIFIED SOLUTION
Avatar of Cliff Galiher
Cliff Galiher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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?
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.
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.