How to confirm the presence of VMware related stray entries?
In MEAM logs, if Top 15 resources with type by monitors count is abnormal, we can confirm that stray entries are present. Refer below for example log.

[com.adventnet.appmanager.util.SupportZipUtil]|[INFO]: Top 15 resources with type by monitors count
RESOURCENAME TYPE COUNT
domain-c123 HAI 2500
datacenter-12 HAI 2500
domain-c124 HAI 2500
The normal count would be less than 10 for each RESOURCENAME.
How to verify any issue exists at present?
Execute the below mentioned query from Applications Manager query tool (directly execute in probe incase of Enterprise setup).

For PGSQL Backend,
SELECT to_timestamp(CREATIONTIME/1000) "MO CREATED ON",RESOURCENAME, DISPLAYNAME, RESOURCEID FROM AM_ManagedObject, AM_HOLISTICAPPLICATION WHERE RESOURCEID=HAID AND GROUPTYPE IN (3, 1009, 1010, 1012) ORDER BY CREATIONTIME DESC
For MSSQL Backend,
SELECT dateadd(s,datediff(s,GETUTCDATE() ,getdate()) + (CREATIONTIME/1000),'1970-01-01 00:00:00') "MO CREATED ON",RESOURCENAME, DISPLAYNAME, RESOURCEID FROM AM_ManagedObject, AM_HOLISTICAPPLICATION WHERE RESOURCEID=HAID AND GROUPTYPE IN (3, 1009, 1010, 1012) ORDER BY CREATIONTIME DESC
This query will show the last time of creation for the VMware related entries. If any duplicated are entries created at present (or) very recently, further troubleshooting is needed. If this occurred long before or just before the upgrade to version 17.x, then no existing issue is present. We can perform cleanup.
How to execute cleanup queries?
For PGSQL Backend,
1. Shutdown the Applications Manager service.
2. Take a backup of Applications Manager database.
3. Connect to the Database by following this steps.
4. Execute the queries attached in the vmware_cleanup.txt one by one.
5. Start the Applications Manager service.
For MSSQL Backend,
1. Shutdown the Applications Manager service.
2. Take a backup of Applications Manager database.
3. Connect to the Database using SQL Server Management Studio.
4. Execute the queries attached in the vmware_cleanup.txt one by one.
5. Start the Applications Manager service.