Event 15, Failed to restore configuration for port

Jelloland 1 Reputation point
2022-11-18T16:50:55.397+00:00

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.

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,062 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. James Jensen 1 Reputation point
    2022-12-22T20:34:42.503+00:00

    Did you find any information on this? We have had 2 major issues in the last 2 weeks related to that registry path and thousands of invalid virtual switch port entries
    I wrote a script to remove all invalid entries, and everything started working again. I didn't lose connectivity to the host like you described.

    The article that you referenced was the only post I found when we had our first issue. After maintenance no VMs could be started because of what I would call switch port exhaustion.

    0 comments No comments