A few months ago I had the following situation on one of our Hyper-V 2012 servers:
-Accidentally changed security permissions on a root folder containing VMs and their storage
-Despite changing them back, Hyper-V manager couldn't restart, change settings for or delete VMs
I created new VMs and attached the original VHDs and got everything running again. I tried to delete the XMLs for the dead VMs but this didn't remove them from the VM list. I've tried using powershell and looking through the registry to delete the VMs but no luck. I keep getting errors about the VM not being able to do anything in its current state.
Although I don't care much about them hanging around. I'm getting funny issues when using New-VM from a remote client to create VMs in powershell. The command always fails only saying:
New-VM: Not Found
Which I believe to be an error trying to enumerate VMs at the server-end. I can use New-VM to create VMs remotely on all of our other Hyper-V hosts, both 2012 and 2012 R2. I'm struggling a bit to find documentation on how to brute-force remove these stale/orphaned VM entries. I have tried twice to reboot the server to see if that would make a difference.
Any tips would be appreciated, thanks