Monday, October 27, 2014

HyperV VHD Permissions

Due to a lack of resources on one of our HyperV hosts, I had to move the VHD to another drive to perform some work. When I moved the VHD back to the original location, I could not start it!
Apparently my earlier actions has stripped the Virtual Machine SID permissions and therefore Hyper-V couldn't take control of the file as necessary.  In order to restore the file permissions I ran the following:

icacls “<path to VHD>.vhd” /grant “NT VIRTUAL MACHINE\<virtual machine SID>”:F

If you don’t know the virtual machine SID, navigate to the folder storing your virtual machine files and click on the Virtual Machines subfolder.  Inside this folder is an XML document named the same as the SID

No comments:

Post a Comment