VMware clear data from database

VMware host and cluster data not appearing in inventory

Scenario: the customer is seeing VMware virtual machines in inventory without cluster and host information. We can see in the VMware logs that the virtual machines are being picked up from the VMware connector, however we are not associating the data to inventoried machines. The system has been checked for any missing VMware ESX servers and vCenters, and there is certainty that all connectors are present and functioning correctly.

This fix will purge the VMware host and virtual machine data. The connector then needs to re-run.

There are 4 main things we are going to do here:

  1. Run a SQL query to identify in the database the number of hosts and virtual machines

  2. Run a SQL query to delete all the hosts and virtual machines from the User Interface

  3. Run a SQL query to delete ,SQL database table VMware host records that have been marked as deleted in the user interface and remove associated VM host activity data

  4. Re-run the VMware connector

Here is the step-by-step guide for performing the purge.

  1. RDP to the application server

  2. Log into Certero Provisioning Services

  3. Create a backup of database

  4. Run SQL Server Management Studio as admin

  5. Run the SQL query ‘identify VMware data’ (this will show VMware data in the database)

  6. Run the SQL query ‘delete VMware hosts from UI’ (this will set the UI to 0 x VMware hosts and 0 x VMware virtual machines)

  7. Check the UI – Virtualization > VMware virtual machines and Virtualization > VMware hosts. These will be zero counts.

  8. Run the SQL query ‘Purge deleted VMwareHost records’ (this will delete VMware hosts in the database)

  9. Run the SQL query ‘identify VMware data’ and it will show 0 x VMware hosts and 0 x VMware virtual machines in the database tables.

  10. Close SSMS, log off the server

  11. Go back into the UI

  12. Go to Connectors > VMware

  13. Right-click and hit ‘run now’

  14. Check the host and cluster information in inventoried VMware virtual machines data grids, under the ‘virtualization’ tab.