lcaccamo
Contributor
Contributor

Help with preventing and/or handling ghosted NICs when cloning

I am deploying vms to remote sites using OVA's instead of templates since they are compressed this way. I am looking for a way to prevent ghosted NICs or to deal with ghosted nics. We have to deploy the same 4 VMs to dozens of sites but everytime that I deploy them we have the same problem. The NIC binding order gets changed, the connection names are lost and replaced with "local area connection" names, and the NIC settings are all changed (protocols and such). I need the clone VMs to be identical to the orginals vms.

I fix the problem by deleting the ghosted nics in the OS and resetting ups the NICs as they are suppose to be. Here's the ghosted nic deletion processs.

set devmgr_show_nonpresent_devices=1

start devmgmt

    >Show hidden devices

    >delete hidden NICs

Anyone have any insights on how to deal with this issue more gracefully?

0 Kudos
4 Replies
TBKing
Enthusiast
Enthusiast

Can you create the OVA without NICs and then a script to install and config after deploy?

I've taken a similar step when upgrading VM Hardware, or changing VM NIC type - removing the NICs before shutdown\upgrade\change, then adding in afterwards.

0 Kudos
lcaccamo
Contributor
Contributor

Sounds like a good start... Is there a way to add a NIC from within the guest OS?

0 Kudos
Rumple
Virtuoso
Virtuoso

try installing this hotfix on the vm's before cloning if they are windows 2008 r2....there is a bug that causes the nic to regenerate each time its moved...I found that on my vm's if I install it on an existing running vm it reverts it back to the very first nic in the system (vs giving me the local area network #2 or #3,etc...

Windows may fail to boot from an iSCSI drive if networking hardware is changed

0 Kudos
octavioadmin
Contributor
Contributor

I had to remove these for many VMs, including some that had multiple Ghost NICS. I used Powershell to write a script from scratch. I then use remotely connect to the target machine and run the script as system (which allows a few of the required registry keys to delete - they are normally locked). This should get rid of them once and for all Smiley Happy

Here's a link to my script:     How can I use PowerShell to Remove "Ghost" (Old Hidden) VMware Network Adapter...

0 Kudos