HyperV machine missing network card after restoring VHD on Windows 2012 server

Problem

  • You have restored a VHD or moved it to a new HyperV 2012 Server from a 2008 server.
  • When you restore and recreate the HyperV machine and start it up, it has no network connectivity.
  • Running ipconfig shows media disconnected with no network card.

081113_1319_HyperVmachi1

  • Device manager shows no network device and Other devices showing as unknown device

081113_1319_HyperVmachi2

Solution

  • run a command prompt and configure the system to start in safe mode
  • bcdedit /set {default} safeboot
  • Shut down and restart the virtual server
  • Open device manager

081113_1319_HyperVmachi3

  • uninstall the Microsoft virtual machine bust network adapter and the unknown devices

081113_1319_HyperVmachi4

  • insert integration services setup disk from the HyperV menu

081113_1319_HyperVmachi5

  • run the setup to install the latest integration components

081113_1319_HyperVmachi6

  • press OK to upgrade and restart the server

081113_1319_HyperVmachi7

  • It may show configuring windows updates for a while

081113_1319_HyperVmachi8

  • I found the system went through 2-3 reboots until it finally came back to a login screen in safemode.
  • Login and check the device manager
  • you should see the Microsoft virtual machine the network adapter


081113_1319_HyperVmachi9

  • open a command prompt and run ipconfig to confirm an adapter is now present. It may have a self assigned 169 address unless you have a DHCP server running outside the VM.
  • and remove the SafeBoot option

    bcdedit /deletevalue {default} safeboot

    • reboot again to start in normal mode
    • I found going to reset the network address settings for static address would have remembered the previous address and prompts you.

081113_1319_HyperVmachi10

  • Set the address, reboot and confirm it comes up OK