Carl Webster Accessibility Statement

Carl Webster is committed to facilitating the accessibility and usability of its website, carlwebster.com, for everyone. Carl Webster aims to comply with all applicable standards, including the World Wide Web Consortium’s Web Content Accessibility Guidelines 2.0 up to Level AA (WCAG 2.0 AA). Carl Webster is proud of the efforts that we have completed and that are in-progress to ensure that our website is accessible to everyone.

If you experience any difficulty in accessing any part of this website, please feel free to email us at info@carlwebster.com and we will work with you to provide the information or service you seek through an alternate communication method that is accessible for you consistent with applicable law (for example, through telephone support).

  • XenServer Ghost Devices Woes

    February 1, 2016

    XenServer

    As you may recall from my previous article, XenServer and HP Firmware Woes,  I was involved in a rather large XenServer upgrade project.

    Anyone that has done some XenServer updates/upgrades surely has come across the “ghosted nics” issue before. I’m certainly not alone since CTP Alexander Ervik Johnsen also wrote a little something on his blog the other day. You can read about his solution here.

    As you might have guessed, Ghost or Phantom NICs are a bad thing. The solution sounds simple enough: get rid of them. From a technical perspective, it’s not a difficult thing to do. As Alexander Ervik Johnsen mentioned, it’s a matter of following these steps:

    1. Log in as a local admin account (TIP: make sure you know this one BEFORE you start upgrading)
    2. Open a command prompt
    3. Issue the command “set devmgr_show_nonpresent_devices=1”
    4. Launch Device Manager by typing devmgmt.msc in the same command prompt session (so the device manager session “sees” the environment variable)
    5. In Device Manager, select View -> Show hidden devices
    6. Now the Ghosted NIC’s should be visible, and you should be able to uninstall them just by right-clicking them and selecting uninstall

    It’s a quite straightforward procedure to follow, but it can become a very tedious job if you need to go through these for a high number of VM’s.

    And there’s more to it. From time to time, Device Manager does not seem to respond to the uninstall command. You click uninstall, you do a refresh, and the device is still there. Issuing multiple uninstall commands won’t help you either.

    So then there is the option to dive into the Registry and carve out the Ghost device by hand. It can be done, but it will take time and is not without any risk.

    The solution? Enter a marvelous tool I (re)discovered recently: GhostBuster (by wvd_vegt, https://bitbucket.org/wvd-vegt/ghostbuster/src/master/). It scans for ghosted devices, shows them in a nice GUI, so you can select the Ghosted NIC by selecting “Add Device”.

     

    Figure 1
    Figure 1

    When selected, you hit the Remove Ghosts button

    And you’re done.

    Ghostbuster even comes in a portable format, so there’s no need to install it every time.

    So, to make my life a bit easier, I created a small ISO file that I can mount on a VM. That ISO contains a couple of things:

    • start.cmd -> sets the devmgr environment variable and starts Device manager with “View Hidden” already enabled
    • the MMC used by start.cmd, which is good old Device Manager with “View Hidden” enabled.
    • the portable version of Ghostbuster

    I’ve thought about automating it some more, like using GhostBuster to clean stuff automatically. The biggest issue is that in my environment, the number of ghosted nics is not always the same, and it’s not always the “Realtek” either, I’ve seen cases where I have the Realtek nic, and 3 ghosted Xenserver NICs together. In that type of situation, I’d like to control things myself because this usually means something else is also very much messed up with that VM.

    Maybe I’ll do the automation part in the future, but I use the ISO as-is for now. If you like it too, you can find it in the Downloads section.

    You can always find the most current files by going to https://www.carlwebster.com/where-to-get-copies-of-the-documentation-scripts/ and looking in the Bart Jacobs’ Toolbox section.

    Thanks

    Bart Jacobs







    About Bart Jacobs

    Bart Jacobs is a Senior System Engineer/Consultant based in Belgium. He started his career back in 1998. One of the first projects he worked on in those days was Citrix Metaframe 1.8 on Microsoft Windows NT 4 Terminal Server codename "Hydra". Over the years, Citrix technology has always been a major theme in his professional career, resulting in becoming a true technical expert in the matter. In the last few years, he has also become an expert in virtualization technology, with a special interest in a real challenger in this business: Citrix XenServer. Bart has founded his own company BJ IT back in 2007 and is mainly working as a (Citrix) consultant now. In 2019, Bart received his Citrix CTA award.

    View all posts by Bart Jacobs

    One Response to “XenServer Ghost Devices Woes”

    1. Alan Lantz Says:

      Now why didn’t I think of this. I get so annoyed with ghosted network interfaces. Next time I upgrade XenTools I will have this handy.

      Reply

    Leave a Reply