To resolve this issue, delete stale entries from the embedded PostgreSQL database.
To delete stale entries from the embedded PostgreSQL database:
Note: Take a full backup of your PostgreSQL database before making any changes.
- Run this command to stop the vCenter Server service:
service vmware-vpxd stop
- To log in to the PostgreSQL database, run this command:
/opt/vmware/vpostgres/1.0/bin/psql -d VCDB vc
Notes:
- If you are prompted for a password, obtain the password from the /etc/vmware-vpx/embedded_db.cfg file.
- For VMware VCSA 6.0:
- vPostgress Database location is:
/opt/vmware/vpostgres/current/bin
- Password location:
vi /root/.pgpass
- To find asset IDs for the host with stale license assignment entry, run the query:
Select * from vpx_lic_assets;
Note: Note the asset_id(s).
-
To delete the stale entries from the vpx_lic_asset_properties table, run the query:
Delete from vpx_lic_asset_properties where asset_id='id noted in step 3';
-
Execute the query for each stale entry noted in step 3.
- To find context IDs for each asset_id, execute the query:
Select * from vpx_lic_context where asset_id='id noted in step 3';
Note: Note the context_id for each asset_id noted in step 3.
- To delete stale entries from the vpx_lic_usage table, run the query:
Delete from vpx_lic_usage where context_id='id noted in step 6context_id noted in step 6.
- To delete stale entries from the vpx_lic_context table, run the query:
Delete from vpx_lic_context where asset_id='id noted in step 3';
Note: Run the query for each asset_id noted in step 3.
- To delete stale entries from the vpx_lic_assets table, run this query:
Delete from vpx_lic_assets where asset_id='id noted in step 3';
Note: Run the query for each asset_id noted in step 3.
- Run this command to start the vpxd service:
service vmware-vpxd start