How to remove "Ghost" NIC devices from Windows

How to remove "Ghost" NIC devices from Windows

book

Article ID: CTX221733

calendar_today

Updated On:

Description

Unidesk 2.X releases before 2.8.3: After Desktops have been backed up and restored to a new CachePoint, the NIC doesn't come up. Even after restarting to apply changes and rediscovering the disks, the driver does not appear to install correctly. This can also happen during layer changes on a desktop.

For all versions of Unidesk & App Layering: The underlying problem is that every new instance of a VMXNet3 network device is detected by Windows as a completely separate device. Unlike E1000-compatible devices, which re-use the same device nodes, every new MAC address on a VMXNet3, even if it's in the same virtual PCI location, causes a new device detection. So these devices accumulate in the registry as no-longer-present devices. When Unidesk is attempting to merge multiple VMXNet3 device nodes from multiple layer sources, we sometimes fail to merge them properly. This can result in Windows not being able to bring up any network interface until the excess nonpresent device records are removed.

VMware is aware of the VMXNet3 proliferation problem. They may recommend an MS patch referenced in this VMware KB: http://kb.vmware.com/kb/1020078. However, Unidesk has observed this patch to break the VMXNet3 driver when included in an OS layer update, so we do not currently recommend it. If you apply this patch in an OS layer version, you may wind up with desktops with a non-functional VMXNet3 device, and uninstalling it from the device manager does not actually remove it.

Resolution

The following instructions apply to Windows 7 and 2008.  Startingin Windows 8, you no longer need to start Device Manager in Nonpresent Devices mode.  Just run DevMgmt and Show Hidden Devices, and you will automatically see the grayed-out nonpresent devices too.

For Windows 7, close any open instances of the Device Manager.  Open an Administrator Command Prompt and type the following:

Set devmgr_show_nonpresent_devices=1
Devmgmt.msc

This brings up the device manager with the flag enabled that allows you to see non-present (or ghost) devices. In the device manager:

  1. Select View > Show Hidden Devices.
  2. Expand the Network Adapters List.
  3. Uninstall ALL of the VMXNet3 network adapters (there will likely be several; also do not delete drivers).
  4. Uninstall any unknown devices.
  5. Leave the other network devices alone.
  6. Select Action > Scan for Hardware Changes.

Windows should now re-discover the VMXNet3 device and install it properly. Because this information is stored in HKEY_LOCAL_MACHINE, it should be sufficient to clean this up in the OS layer, and it should fix it for any other machines.