We have a failover cluster of three nodes running Hyper-V and recently I started looking into Event 15 we get on the Microsoft-Windows-Hyper-V-VmSwitch provider:
Failed to restore configuration for port {guid1} (Friendly Name: ) on switch {guid2} (Friendly Name: ), status = Object Name not found..
Based on this article, it seems like it should be resolvable by removing certain empty registry keys or ones that don't have a friendly name. So I created and ran this to find them:
Get-ChildItem HKLM:System\CurrentControlSet\Services\vmsmp\parameters\SwitchList |
Get-ChildItem | ? { $_.PSChildName -match '([0-9A-F]{4,8}-){4}'} |
? { (!(Get-ItemProperty $_.PSPath)) -or (!(Get-ItemProperty $_.PSPath).FriendlyName) }
Where I came up with a little over 10,000 such matches.
I backed up the parent key and removed them with:
Get-ChildItem HKLM:System\CurrentControlSet\Services\vmsmp\parameters\SwitchList |
Get-ChildItem | ? { $_.PSChildName -match '([0-9A-F]{4,8}-){4}'} |
? { (!(Get-ItemProperty $_.PSPath)) -or (!(Get-ItemProperty $_.PSPath).FriendlyName) } |
% { Remove-Item -LiteralPath $_.PSPath -Recurse -Confirm:$false }
But when I tried rebooting the node, the host server lost connectivity. I still had an IP address but I couldn't ping the gateway anymore, only 127.0.0.1. I tried changing the IP but it still remained in a weird broken state. I restored the key and rebooted again and it came back up.
Is there another way I should go about resolving these errors? Or perhaps I missed something in my research/execution.