Wednesday, March 2, 2016

[WSRV] Hyper-V VM doesn't start. “‘General access denied error’ (0x80070005)”



  1. Note the Virtual Machine ID that is listed in the "‘General access denied error’ (0x80070005)" error message.

    For example, consider the following error message:

    ‘VMName’: IDE/ATAPI Account does not have sufficient privilege to open attachment
    ‘E:\VMs\VMName\Disk0.vhd. Error: ‘General access denied error’ (0x80070005). (Virtual
    Machine ID 5FC5C385-BD98-451F-B3F3-1E50E06EE663)

    In this example, the Virtual Machine ID is 5FC5C385-BD98-451F-B3F3-1E50E06EE663.
  2. Open an elevated command prompt.
  3. To give the Virtual Machine ID (SID) access to the .vhd or .avhd file, type the following command, and then press Enter:
    icacls <Path of .vhd or .avhd file> /grant "NT VIRTUAL MACHINE\<Virtual Machine ID from step 1>":(F)
    For example, to use the Virtual Machine ID that you noted in step 1, type the following command, and then press Enter:
    icacls "E:\VMs\VMName\Disk0.vhd" /grant "NT VIRTUAL MACHINE\5FC5C385-BD98-451F-B3F3-1E50E06EE663":(F)
  4. Start the virtual machine.
https://support.microsoft.com/en-us/kb/2249906