The VM has been successfully restored, however it fails to start with the following error:
: Account does not have sufficient privilege to open attachment. Error: 'Access denied error (0x80070005)'
This issue occurs if the permissions on the virtual hard disk (.vhdx) file are incorrect, example below:
The above screenshots show that the one with the missing VM SID doesn't have the appropriate rights and hence must be granted the full control permission to their relative VM to operate.
Every Hyper-V virtual machine has a unique Virtual Machine SID. If the Virtual Machine SID is missing from the security permissions on the .vhdx file, the virtual machine will be unable to start.
Notice, a different VM with a working configuration compared to the problematic one.
- Get the Virtual Machine ID, by using the following Powershell cmdlet:
Get-VM '' | Select-Object VMID
- Use the following icalcs command to give the VM ID (from the previous step) access to the affected VHDX:
icacls ".vhdx-file-path" /grant xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:F
- Repeat the steps above for all .VHDX files for this Virtual Machine.
- Now that the Virtual Machine SID is added to the security permission with read/write to the mentioned .VHDX file, and the Security tab should reflect this as per the screenshot below.
Microsoft article: Hyper-V virtual machine may not start, and you receive a “‘General access denied error’ (0x80070005)” error message