If you’re experiencing the issue of a stale vSphere standard port group appearing in VMware vCenter Server even after it has been deleted from all associated hosts, and you still see the standard port group under Home > Inventory > Networking in the vSphere Client, the issue here is that a snapshot was taken on a virtual machine when the standard port group existed so the vCenter keeps it and the port group exists although not assigned to any VM or a host.
If you previously tried following without success:
1. Refresh the vSphere Client:
In the vSphere Client, try refreshing the view to ensure that the latest information is being displayed.
2. Check Hosts for Remaining References:
Manually check each host in the vCenter Server to ensure that the port group has been deleted from all hosts. It’s possible that the deletion process didn’t complete successfully on one or more hosts.
3. Restart Network Services:
Restart the network services on the hosts where the stale port group is appearing. This can be done through the ESXi host’s console or by connecting via SSH.
4. Check for Orphaned Configurations:
There might be orphaned configurations in the vCenter Server database. If possible, connect directly to the vCenter Server database and check for any entries related to the stale port group. Be cautious when directly manipulating the vCenter Server database, and ensure you have a backup before making any changes.
5. Reconnect Hosts to vCenter Server:
Disconnect and then reconnect the hosts to the vCenter Server. This action may help refresh the configuration information.
If the issue persists after trying these steps, you can try to delete the snapshot which was taken when the standard port group existed to address the problem.
To delete the snapshot:
- Navigate to Home > Inventory > Networking in the vSphere Client.
- Select the stale standard port group that is deleted and not in use by any virtual machine.
- Click the Virtual Machines tab, identify the virtual machine that has snapshot
- With the right mouse click on the VM and choose Snapshots > Manage Snapshots
- Mark the snapshot to be deleted (in my case “test” snapshot), choose DELETE and after getting warning message click on the DELETE button in red.
- The snapshot will be deleted:
After identifying the virtual machines with snapshots and deleting them, the stale entry of standard port group should be cleared and it won’t exist anymore.