Home > Command Line, Networking, Registry, Windows Server 2012 > Windows Server 2012 reset networking TCP/IP when NIC team is “Host Unmanageable”

Windows Server 2012 reset networking TCP/IP when NIC team is “Host Unmanageable”

December 4th, 2015 Leave a comment Go to comments

After some scheduled maintenance (Windows Updates, software updates/installation etc) on an older HP DL370 G6 server running Windows Server 2012, a colleague noticed an issue with the networking configuration. Post maintenance, I was told that the server was not accessible on the network, and with it being weekend maintenance my colleague simply added it's IP address back to one of the 4 physical network card ports so that the server was at least accessible again. It later transpired that for some reason, the networking configuration on the server had broken in a way that NIC Teaming was no longer working. This server was also a standalone Hyper-V host, the Hyper-V virtual networking was also broken.

Having had it's workload moved off of it, I began to troubleshoot the issues on the server. I noticed the following:

  • When opening Server Manager and then navigating to Local Server and then NIC Teaming, the status of the server in the 'All Servers' list was:

    Host Unmanageable

  • From the same screen above, next to the 'TEAMS' list (which was empty where we previously had a team defined), clicking on TASKS and then New Team revealed a the 'New Team' window that had none of the 4 physical NIC's listed as an available Member Adapter for teaming. It was therefore not possible to create a new NIC team.
  • When attempting to open the Hyper-V management console, I was presented with many different errors, some of which appeared to be related to networking.
  • All 4 physical NIC's were still appearing in device manager and Control Panel\Network and Internet\Network Connections.
  • Hyper-V networking components were still appearing in device manager and Control Panel\Network and Internet\Network Connections.

Below are the steps I went through, in order, to reset/rebuild networking and the TCP/IP stack in order to resolve the issue:

1) Since the Hyper-V management console wouldn't let me modify any of the virtual networking configuration, I manually pruned everything below the following registry keys to remove the inaccessible Hyper-V networking:

Key:   HKLM\SYSTEM\ControlSet001\Enum\ROOT\VMBUS
Key:   HKLM\SYSTEM\ControlSet001\Enum\ROOT\VMS_MP
Key:   HKLM\SYSTEM\ControlSet001\Enum\ROOT\VMS_VSMP

A Scan for hardware changes from device manager revealed that the Hyper-V Virtual Ethernet Adapter had disappeared.

2) I found a copy (Unknown Adapter Fix.zip) of a Microsoft tool called ndiscleanup.exe that can be used to clean the registry of networking information. From an elevated command prompt I ran the x64 version of ndiscleanup.exe:

ndiscleanup.exe -cleanup -all

This removed registry entries for remaining NIC GUID's and took a minute or so to run.

3) I then proceeded to completely rebuild WMI as windows networking information is also stored/available in WMI. The first thing I did here was to rename the folder "Repository" under C:\Windows\System32\wbem\ to "Repository.old". I had to stop and disable the winmgmt (Windows Management Instrumentation) service before I could do this.

You can find many scripts for rebuilding WMI online, but most of them use incorrect syntax or commands. I actually had the script below given to me by Microsoft support, it works. I saved the following script into a file called WMIReset.bat and then right clicked the file and then 'Run as Administrator':

@echo off
sc config winmgmt start= disabled
net stop winmgmt /y
%systemdrive%
cd %windir%\system32\wbem
for /f %%s in ('dir /b *.dll') do regsvr32 /s %%s
wmiprvse /regserver 
winmgmt /resetrepository 
sc config winmgmt start= Auto
net start winmgmt
for /f %%s in ('dir /s /b *.mof *.mfl') do mofcomp %%s

4) I deleted the following from the registry which contain data on the server's networking configuration:

Key:   HKLM\SYSTEM\CurrentControlSet\Control\Network
Value: Config
Key:   HKLM\SYSTEM\CurrentControlSet\Services\NdisImPlatform\Parameters

Note: I only deleted all sub-keys and values, not the "Parameters" key itself

5) As per a previous post of mine, I launched a command prompt with administrative privileges, and ran the following commands:

SET DEVMGR_SHOW_NONPRESENT_DEVICES=1
START DEVMGMT.MSC

This will start device manager with the option to 'Show hidden devices'. To enable this option I went to:

View -> Show hidden devices

I then deleted any "ghosted" unavailable network interface cards listed
I also uninstalled ALL physical network adapters listed

6) I launched a command prompt with administrative privileges, and ran the following commands to reset the TCP/IP stack:

netsh int ip reset
netsh int ipv4 reset
netsh int ipv6 reset

After completing the 6 steps above, I rebooted the server and then logged in. I now had no more errors in the server manager, and when I attempted to team the physical NIC's I could see all 4 adapters in the 'New Team' window. However, when I attempted to create the team, I received the following error (this also happened when attempting to use PowerShell to team the NIC's using the New-NetLbfoTeam cmdlet):

Operation timed out: TeamNic installation did not complete in a timely manner.

This post lead me to the fix. In Control Panel\Network and Internet\Network Connections I right clicked on the first physical NIC and then selected Properties. I then clicked on the Install... button and proceeded to add the Protocol called Microsoft Network Adapter Multiplexor Protocol. After verifying that installing the protocol meant that it applied to all 4 of my physical NIC's I was able to team them successfully.

Lastly, I had to recreate the Hyper-V virtual networking. When attempting to open the Hyper-V management console I repeatedly received the error:

An error occurred while trying to retrieve a list of virtual switches.

This post lead me to the fix. In Control Panel\Network and Internet\Network Connections I right clicked on the first physical NIC and then selected Properties. I then clicked on the Install... button and proceeded to add the Protocol called Hyper-V Extensible Virtual Switch. After verifying that installing the protocol meant that it applied to all 4 of my physical NIC's, I was able open the Hyper-V management console without any errors and create a virtual switch that utilised my previously created NIC team.

  1. No comments yet.

*

code