Loading NIC drivers in Hyper-V Core

This is a somewhat random post to put up here but maybe it will help save someone else time. I’m fascinated by virtualization and cloud technologies and recently virtualized all of Element 84′s infrastructure into an AMD based server running Microsoft’s Hyper-V Server Core 2008 R2. On the whole installation and setup went well with the exception of the built-in Realtek NICs. Realtek is decent at the consumer level but just doesn’t cut it for server class. In particular, Hyper-V has all kinds of networking issues trying to share a Realtek NIC across VMs*.

After many hours of banging my head against it I eventually gave up and spent the $30 to buy an Intel based NIC. In short, it works great and addressed the networking issues. However, even though the card is natively supported by Server 2008 R2 that Hyper-V Server is based on, it wasn’t immediately detected when I installed it. The easiest way I found to get the driver to load after initial installation is to use the devcon command line tool included with the Windows Driver Kit. It’s a command line version of Device Manager (since Server Core doesn’t include the device manager and running it remotely only allows read-only access).

First, verify that Hyper-V physically sees the card:
devcon findall =net

PCI\VEN_10EC&DEV_8167&SUBSYS_81671019&REV_10\4&35E69562&0&28A4: Realtek PCI GBE
Family Controller
ROOT\VMS_MP\0000 : Microsoft Virtual
Network Switch Adapter
PCI\VEN_8086&DEV_107C&SUBSYS_13768086&REV_05\4&35E69562&0&00A4: Intel(R) PRO/100
0 GT Desktop Adapter
ROOT\VMS_MP\0001 : External Network
4 matching device(s) found.

This should return network interfaces installed in your machine, including the new one. Next, check the status of the card:

devcon status "@<physical ID from findall command...>"

For example:

devcon status "@PCI\VEN_8086&DEV_107C&SUBSYS_13768086&REV_05\4&35E69562&0&00A4"

This should tell you that the card exists but has a problem, usually Code 01 if the driver exists but isn’t loaded. Code 31 means the driver it wants it can’t find – in that case you’ll need to download and install the vendor driver using “pnputil -i -a *.inf”.

Next remove the device then scan for PnP changes which will find it again, this time properly starting the driver:

devcon remove "@<same ID as earlier...>"
devcon rescan
devcon status "@<same ID as earlier...>"

This time it should come back happy and tell you that everything is working properly. The card should now be available in Sysconfig and the Hyper-V remote admin tools. Hope that helps — Dan

*There are a number of “tweaks” you can do to try and work around the issues such as disabling all offloading options in both the host and VMs and disabling TCP chimney support, RSS, and window autotuning but those are… “tweaks”… at best. See the technet link above for some suggestions.


4 Comments

  1. Thanks a lot. It solved my problem.( removed “? mark” hardware, and rescan so that it apply the correct driver which I already installed by PNPUtil)
    Thanks

  2. Daniel McCreesh

    Works well thanks…. used it to remove adapters with duplicate Friendly Names under HyperV … changed instance index reg value before rescan and all now have correct unique numbers appended.

    Noted that remove often returns “failed to remove…..” when it actually has.

    Appreciated

  3. Joseph Southwell

    So what do I do in the event that on startup it reports
    “No activate network adapters found”
    but status shows
    drivers is running?
    I am at a loss.

  4. Tom Carpenter

    Hi!

    There is a most easier way. You can select the driver during the installation – when you select the disk driver – as second driver. It works great!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>