Obsah
Device Console Utility
Device Manager v konzolové aplikaci.
Nástin problému – Ačkoliv síťová karta je nativně podporovaná ve Windows 2008 R2, v Server Core edici nebyla rozpoznána správně. Pokud se připojíme přes vzdáleného Správce zařízení, píše to chybu 31. Pro instalaci ovladačů a znovu načtení ovladačů se použijí dvě aplikace:
- pnputil – pro instalaci ovladačů (.inf soubory); součást windows
- instalace
pnputil -i -a package.inf
resp.
pnputil -i -a *.inf
- odebrání
pnputil -d -f package.inf
- devcon – konzolovka, součást Windows Driver Kitu (WDK).
Instalace Intel ovladačů
Pro instalaci Intel ovladačů v Server Core edicích se dá použít utilita SetupBD.exe (která je společně s ovladači v Tools)
Získání DevConu z WDK
- Stáhnout Windows Driver Kit. WDK 7.1.0
- Připojit ISO obraz.
- k získání DevConu:
- buď přímo WDK nainstalovat: použít KitSetup.exe.
- nebo provést Administrative Installation MSI balíčku „setuptools_<Platform>fre.msi“:
- execute the following command:
"%SystemRoot%\System32\msiexec.exe" /a "<path to WDK>\setuptools_<Platform>fre.msi" targetdir="<Desired Path>"
např. (architektura x64, D: je virtuální mechanika)
"%SystemRoot%\System32\msiexec.exe" /a "D:\WDK\setuptools_x64fre.msi" targetdir="%temp%"
Použití
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.
Nastavení přístupu do Device Manageru přes mmc z jiného serveru
netsh advfirewall firewall set rule group=“remote administration” new enable=yes
The above command will allow for most remote management tools to work out-of-the-box. However, in addition to allowing the MMC snap-ins through the firewall, using Device Manager remotely requires additional configuration. If you don't perform the following steps you will end up with this error:
Running Device Manager remotely
To allow Device Manager to connect to a remote computer, you must first enable the “Allow remote access to the PnP interface” setting on the target computer's Local Group Policy.
1. On a Windows Vista or Windows Server 2008 installation, start the Group Policy Object MMC snap-in by typing MMC in the Run box and pressing Enter.
2. In the Add or Remove Snap-Ins window, scroll to find Group Policy Object Editor, and click Add.
3. In the Select Group Policy Object window, click Browse.
4. In the Browse for Group Policy Object window, click Another Computer, and either type or browse for the remote server core machine.
5. In the Select Group Policy Object window, click Finish.
6. In the Add or Remove Snap-Ins window click Ok.
7. In the Group Policy of the remote computer, navigate to Computer Configuration → Administrative Templates → System → Device Installation.
8. Enable the Allow remote access to the PnP interface setting.
9. Close the MMC console (you don't have to save it, but you can if you want to).
10. Restart the Server Core installation.
Now you can connect to the remote server core machine and manage its devices by using Device Manager.
1. Open Computer Management through the Administrative Tools folder.
2. Right-click Computer Management and select Connect to another computer.
3. In the Select computer window, type or browse to the remote server core computer. Click Ok.
4. Expand System tools → Device Manager. Note that now you can perform changes on the listed devices.
And that's it! You are done!