0

Account does not have permission to open the attachment: Hyper-V VM Error

CRM servers are distributed among three virtual machines namely, Web, App and DB. They are hosted by a single host machine. After a power trip I am experiencing an error because the machine was shutdown. CRM is stagnated, restarting the host machine doesn’t even help.

I received an error as I turned into my machine to hit by an error that Web server wasn’t connected. After giving it a try to start, but failed to do so as it gave the following error:

After looking closely at the error which says,

Account does not have permission to open attachment <vhdx file path>. Error: ‘General access denied error’ (0x80070005)

<VM> failed to start. <Virtual machine ID>

Reason of Error:

The underlying cause of the error was due to, if the information which resides on virtual hard disk or the snapshot file is not correct.

Each Hyper-V VM constitutes of a peculiar VM ID, machine will not start if the VM SID is not found on the .vhd  or  .avhd  file and the error will surface on the screen which would be read as General access denied error’ (0x80070005)”

On opening the security permission of working and non-working VMs it was found that SID was not present on the .vhd file.

As the SID is missing, which should be earmarked the full permission to their respective VMs for functioning.

Solution:

1) Fetch the ID of virtual Machine.

  • First, open Powershell.
  • For finding the Virtual Machine ID use cmdlet GET-VM
  • ‘Dynamics365-Web’ | Select-Object VMID

I have confirmed the SID for both, my App and Web VM’s.

2) To allocate the Virtual machine ID, listed below iacls commands should be used.

Syntax:

icacls <path of .vhd or .avhd file> /grant ‘Virtual Machine ID’: F

if you read something like this on screen, ‘Successfully processed 1 files; failed processing 0 files.’ then it means that SIB has been bought to the security permissions with Read/Write to the listed .vhd file

3) Start the VM

The virtual machine has resumed working.

Asad Mukhtar

Leave a Reply

Your email address will not be published. Required fields are marked *