When removing a snapshot for a virtual machine the AVHDX files do not merge to the parent disk and the Event ID 19100 is logged in the Microsoft-Windows-Hyper-V-VMMS event log.
Log Name: Microsoft-Windows-Hyper-V-VMMS-Admin
Date: 30/06/2020 07:02:15
Event ID: 19100
Task Category: None
‘xxx-xxxxxxxxxxxx’ background disk merge failed to complete: General access denied error (0x80070005). (Virtual machine ID xxxxxxxxxxx-xxxx-xxxxx-xxxx-xxxxxxxxxxxxxx)
Correct the permissions
In PowerShell run
runget-vm | fl name, id
Which will output the ID of the virtual server you need to merge
Name : BackupVM
Id : d3599536-222a-4d6e-bb10-a6019c3f2b9b
For each VM ID you need to merge, assign the VMMS process full control by running the following command
icacls <Folder with VHDS> /grant “NT VIRTUAL MACHINE\<VM ID>”:(OI)F
icacls “D:\Hyper-V\Main Server\VHDX Files” /grant “NT VIRTUAL MACHINE\a0af7903-94b4-4a2c-b3b3-16050d5f80f2”:(OI)F
Merge the changes
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.
To merge Hyper-V snapshots, do the following:
- 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.