Hyper-V snapshot error 0x80070005

Ik moest zojuist een snapshot maken en toen kreeg ik te maken met de alom bekende (niet dus) error “Could not create snapshot bla bla bla access denied bla bla error 0x80070005.

hmmmm, wat kan dit zijn? Wat kan ik hier aan doen? het nummer geeft aan rechten….

Ja dus, maar wat missen we? het “Virtual Machine” id, of de groep “Virtual Machines”. Dit houd allesgezegd in, de Virtual Machine heeft geen rechten tot zijn eigen locatie. m.a.w. we moeten dit herstellen. Dit kan je als volgt doen:

http://support.microsoft.com/kb/2249906

en dan vooral het stukje:
ps. voordat je het al gedaan hebt, je kan het “id” van de vm ook kopieren uit de “sub-folder” waar de config staat ;)

To resolve this issue, add the Virtual Machine SID to the virtual hard disk (.vhd) file or to the snapshot file (.avhd).

To add the Virtual Machine SID to a .vhd or .avhd file, follow these steps:

  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 was 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.

een voorbeeld:

 icacls “E:\VMs\VMName\Disk0.vhd” /grant “NT VIRTUAL MACHINE\5FC5C385-BD98-451F-B3F3-1E50E06EE663”:F

Maar misschien tref je het net als ik dat je .vhd in de root staat. Je snapshots komen er dan vrolijk naast. Pas dan de regel aan naar (let op, je haalt dus de aanhalingstekens om de driveletter weg.:

icacls E:\ /grant “NT VIRTUAL MACHINE\5FC5C385-BD98-451F-B3F3-1E50E06EE663”:F

Ziehier het resultaat.

0 antwoorden

Plaats een Reactie

Meepraten?
Draag gerust bij!

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *