Solved: Cannot delete checkpoint: Catastrophic failure (0x8000FFFF)

Solved: Cannot delete checkpoint: Catastrophic failure (0x8000FFFF)

Cannot delete checkpoint

“Cannot delete checkpoint: Catastrophic failure (0x8000FFFF)” or “cannot delete checkpoint subtree containing a recovery checkpoint” Read. Today I came across an issue with one of my clients was facing on a windows 2012 server. The client had set up the Windows backup and he was just taking full backup with HyperV recovery checkpoint. Which causes HyperV to take snapshots. However, the client didn’t notice it the drive was getting full. Finally, when the drive got full he called me and mentioned the drive is running out of space.

hyper-v_catastrophic_failure_0x8000ffff-474x
cannot delete checkpoint subtree containing a recovery checkpoint
Catastrophic failure

As I checked it was obvious there were more than 18 snapshots and multiple AVHDX files were created. I noticed the recovery checkpoint was broken for a virtual machine. I was unable to delete the snapshot stating the error “Cannot delete checkpoint: Catastrophic failure (0x8000FFFF)” read error and the checkpoint tree was also not getting deleted “cannot delete checkpoint subtree containing a recovery checkpoint”.

Multiple AVHDX files on Hyper V folder were VM and VHD file is stored
Catastrophic failure

I did little research online there were multiple suggestions like exporting the latest AVHDX and then importing a new VM read more here. Also, there was a suggestion to Manually Merge .avhd to .vhd in Hyper-V” read here. Both options were not conversable for me.

Then I tried the below method to manually merge the AVHDX files.

Note: Before proceeding with the below steps I strongly recommend taking the back of the VM disks and note down the VM configuration. In case the server did not come up you can spin up a new VM with similar configurations and attach the same disk. If possible take the entire VM backup to a safe location.

Step 1: Open the PowerShell ISE with the Administrator

Cmd to get the Hyper V AVHDX disk chain
Catastrophic failure

Step 2: Type the PowerShell cmd Get-VHDChain – Name “VM01” | Format-List. Replace the VM01 with the VM name you are facing an issue with. This cmd with help you to get the HyperV AVHDX disk chain for a particular server.

Catastrophic failure

Step 3: The Above cmd will display all the AVHDX disk chains. Then copy all the output data to a Notepad. Active Directory is my VM name here.

Catastrophic failure

Step 4: Merge the AVHDX with the original VHDX file. Use the below CMD in Powershell to Mere the AVHDX files. Note it will Merge all the disks within the loop. So once you initiate cmd we do not need to perform it for individual AVHDX files.

# This script is to run once for each disk. The starting file is the currently used disk file of the VM.
# BEFORE running the script, please UPDATE the starting file path
# Please run this script on a Hyper-V Host with access to the CSV to use "Merge-VHD" commandlet
# Before running this, it is a good idea to check if the inspect disk chain on the current AVHDX takes it upto the parent disk or not
 
$LogFile = "C:\Scripts\Merge_$(get-date -f yyyy-MM-dd-hh-mm-ss).log" 
$StartingFile =  "G:\Hyerp-V\Active Directory_597084E2-16EF-4CCC-8AEE-7661D7D4B720.avhdx" # Enter the first path of AVHDX which you copied to notepad in step 3
 
#It can also run on local folders with your VHD’s as well
 
New-Item $LogFile -Force # Always creates a new log file
Get-Date >> $LogFile
 
$HasParent = 1
$WorkingFile = $StartingFile
 
# Loop until the disk file has no parent, this is normally the original VHDX file
While ($HasParent -eq 1) {
 
    Get-Date >> $LogFile
    $WorkingFile >> $LogFile
 
    $ParentFile = Get-VHD -Path $WorkingFile | Select ParentPath
 
    If (($ParentFile.ParentPath -eq $null) -or ($ParentFile.ParentPath -eq "")) 
{
    Write-Host "No ParentPath found."
        $HasParent = 0
    } else {
        Merge-VHD -path $WorkingFile -DestinationPath $ParentFile.ParentPath
        $WorkingFile = $ParentFile.ParentPath
        "Next working file: $WorkingFile"
    }
}
Catastrophic failure

Step 5: Verify the report if all the AVHDX was merged properly. This will merge all the AVHDX one by one automatically and a report will be generated in the C:\Scripts folder. Now you can go to the Hyper V folder where VM/VHD is stored all the AVHDX are gone. If the checkpoints are not going away from the Hyper V console just reboot the HyperV it is just a stale entry.

Catastrophic failure

I hope this is helpful for you. Let me know if you have any questions in the comment section.

Share this content:

Annan Malla

Hello, I'm Annan Malla, an experienced system engineer with a strong skillset in system administration, cloud computing, network administration, computer hardware, and Windows server. I hold a Masters Degree in Business Administration with a focus on Information Technology from LPU Punjab University