5

Some updates crashed my hyper-v virtual machine. The good news is I created a copy of the vhd file yesterday, will have to reinstall programs, but at least I won't have to start all over. I deleted the current vhd, and put the backup in the directory. When I try to start the VM I receive this error:

hyper-v error

I have tried to give the VM domain users full rights permissions, but that didn't fix the issue. Thanks for the help in advance

  • 1
    When you say you gave them Full permissions, do you mean on the directory or on the .vhd file itself? Also, do you have multiple VMs on that box? – Taegost Jul 11 '13 at 14:17
3

What you need to do is delete your Virtual Machine and create a new one. Then choose the existing .vhd during the setup process.

0

You need to reset the permissions on the VHD files to give the individual VM guid access. Here's some PowerShell I wrote to do this quickly. Just select the VMs you want and click OK.

If you don't have Out-GridView, you'll need to modify the code slightly.

foreach ($vm in (Get-VM | ogv -PassThru)) {
    foreach ($vhd in $vm.HardDrives) {
        $vhdpath = Split-Path $vhd.Path -Parent
        icacls "$vhdpath\*.*vhd*" /grant "$($vm.VMid.Guid):F"
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.