After installing Windows 2008 in a virtual machine you might want to switch to the VMXNET3 virtual network adaptor instead of the default E1000 virtual network adapter. This is an easy job, just delete the E1000 NIC and ad the VMXNET3 NIC to the virtual machine. When you want to assign the same IP-address to the VMXNET3 you probably will be notified that the address is already in use. But who’s using the IP address? It’s used by a ghosted or hidden device. You will have the same problem with P2V migrations. A lot of ghosted devices are still registered in your virtual machine, even all the USB key you’ve used in the past.
It’s clear that we want to get rid of the ghosted devices and you can do it in two ways. Phi Phi Wang over at IBM has created a script that will silently remove all the ghosted devices, you can download it here.
There’s also a nice open source initiative called Ghostbuster which can be found here.
By default Windows does not show ghosted devices. Windows will show Ghosted devices only if two criteria are met: An environment variable DEVMGR_SHOW_NONPRESENT_DEVICES with a value of 1 is added in Device Manager (Start Menu & Run 'compmgmt.msc' ) if you check the View|Hidden Devices menu item. Because Windows has to detect if a devices is ghosted by trying to start it, a large number of ghosted devices will add to the start-up time of Windows.
The 'regular' way of removing these devices is right clicking each of them, select the uninstall menu item and wait for the Device Manager to uninstall the device and rebuild its tree of devices.
Ghostbuster does this all in one click and removes all the ghosted devices matching your own selection criteria with a single click! You can select and deselect classes or devices through the right-click connect menu of the devices list view. Only ghosted devices (greyed text) AND devices that match the selection criteria (light yellow background) will be uninstalled when the 'Remove Ghosts' button is pressed. All other devices remain untouched.
Beware that windows has a fair number of devices that are ghosted but should not be uninstalled (like devices in the sound, video and game controller class or system and non plug-n-play devices). Ghostbuster marks most of these as services.