How to clean up avhdx.

Arkom Intarachot 1 Reputation point
2021-11-19T02:51:50.137+00:00

Hi

I try to remove check point vm of hyper-v cluster system with windows server 2019 DC. The vm is Exchange server 2019 the disk size 3 TB. I facing the error "Servername' background disk merge failed to complete: General access denied error (0x80070005). (Virtual machine ID 8AD78FB5-D358-439B-BC4F-0399C2794439)". And then I check there is no checkpoint, in GUI or no in powershell. I try to backup VM by veeam the backup successful. I see that the avhdx for the C drive is gone. But the avhdx for the D,F drive it still not merge. I see the time stamp of avhdx it is not up to date.

150816-image.png

So veeam + MS Hyper-v cluster always running fine... The VM Server is very very important (Exchange server 2019).

Could you please help me to recommend best solution to clean up avhdx with minimum impact that VM.

Thank you
Arkom

150764-untitled.png

Windows for business | Windows Client for IT Pros | Storage high availability | Virtualization and Hyper-V
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,931 Reputation points
    2021-12-15T20:19:35.953+00:00

    This is due to a snapshot merge having failed due to the host machine not having correct permissions set on the VHD(x) files.

    Note that your VM must be turned off to avoid any issues during the merging operation.

    Try to correct permission

    icacls <Folder with VHDS> /grant “NT VIRTUAL MACHINE\<VM ID>”:(OI)F

    Example

    icacls “D:\Hyper-V\Main Server\VHDX Files” /grant “NT VIRTUAL MACHINE\a0af7903-94b4-4a2c-b3b3-16050d5f80f2”:(OI)F

    To merge Hyper-V snapshots, do the following: ( Please make sure you have backup of the VM before performing below steps)

    Open Hyper-V Manager.
    Select the required VM.
    Click Edit Disk. The Edit Virtual Hard Disk Wizard will open. Click Next.
    Click Browse to select the latest AVHDX file. Click Next.
    Select Merge to merge the changes stored in a differencing disk into the parent or another disk. Click Next.
    Select To the parent virtual hard disk and click Finish.
    To fully complete the process of merging Hyper-V snapshots, repeat the steps for each AVHDX file, until all of the changes have merged into the original parent disk.


    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.