PROBLEM


The backup fails with a Microsoft VSS Error, "A problem with Windows Shadow Copy was detected":



As the error suggests, if you take a look at the Hyper-V VMMS event log (Event Viewer → Application and Services Logs → Microsoft → Windows → Hyper-V-VMMS → Admin), you'll find the following event:

Source: Hyper-V VMMS | Event ID: 12290

'Exchange': User account does not have permission required to open attachment 'C:\ClusterStorage\Volume1\exchange-vm\Exchange.vhdx'. Error: 'General access denied error' (0x80070005). (Virtual machine ID 1CD13F50-5E38-4034-B1E8-5D7342BBDD03)



CAUSE


The required permissions aren’t applied on the VHDX files and thereby VSS isn’t able to run successfully. 



SOLUTION


To resolve this error and ensure that you get the correct permissions on the VHDX file for VSS to complete successfully, you can move the VHDX file into a sub-folder. The reason behind this is that any sub-folder created will get the correct permissions and hence once the VHDX is moved into it, it will take on these permissions.


From Windows Server 2012 onwards, you can use the [Move] functionality in Hyper-V or Failover Cluster Manager to re-locate the VHDX without the need to shut down the virtual machine.


C:\ClusterStorage\Volume1\exchange-vm

-to-

C:\ClusterStorage\Volume1\exchange-vm\Virtual Hard Disks


The newly created folder 'Virtual Hard Disks' will get the correct permissions and the next backup will succeed.