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,546 questions
0 comments No comments
{count} votes

2 answers

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

  2. Brian Burleigh 0 Reputation points
    2023-06-24T03:10:36.8766667+00:00

    I know this is from last year at this point, and likely you have resolved this issue or rebuilt the host, but I wanted to comment for anyone who finds this in a search result like I did.

    After reviewing the linked article and the issue you are experiencing, and then contemplating a bit, I decided to ignore this issue. It only happens at boot up and has zero effect on the host or the VMs.

    Admittedly, I do not have this error in a clustered host - just a single one - so I can't say if this effects a clustered environment, although I have my doubts.

    That all being said, I did some digging in the registry and I believe MAYBE deleting the key that represents the unloadable port MIGHT make this error go away, but as it's listed under a working vSwitch you'd want to be really careful - if I was actually having issues I'd be more likely to rebuild the entire vSwitch than to muck about in the registry keys under the existing one (even in a clustered environment, this would be fine - you'd just have to pause the affected node so you don't have a server failover that needs the bad vSwitch until you've removed and rebuilt it).

    0 comments No comments