Ghost port groups appear under Network section for VMs

While performing some VM migrations I encountered a strange anomaly – ghost port groups appearing under the Network section in the vSphere client. Below we can see 4 port groups but there should only be 2:

20140125165153

So what preceded this strange happening? Well, the VMs I was working on were being migrated from an older ESX 4.1 standalone host to a shiny new ESXi 5.1 standalone host. The important factor here is that I had to upgrade VMware Tools and the Virtual Hardware version to the latest versions once the VMs had been moved to the new ESXi 5.1 host. Being a good boy scout I followed the official process detailed here on VMware’s site, which recommended taking a snapshot of each VM prior to upgrading VMware Tools and the Virtual Hardware version. After the snapshot was taken I changed the port groups of each VM to match the new port groups. This was when I noticed this strange occurrence. A quick check of the virtual Network adapters confirmed that there were only 2 networks and not 4:

20140125165235

Once the upgrade work had been completed and we deleted the snapshots those ghost port groups disappeared:

20140125170448

The moral of the story is taking a snapshot of the VM and then changing the port groups while the snapshot is still active will show both the old and new port groups until the snapshot is removed.

Reference:
Upgrading a virtual machine to the latest hardware version (multiple versions)(1010675)