Unable to remove a license key from vCenter Server Appliance

weimoo 4月前 156

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • Unable to remove a license key from vCenter Server Appliance (VCSA) 6.0 and later
  • You are unable to assign a license key to an ESXi host as there are no available licenses


Environment

VMware vCenter Server Appliance 6.0.x

Cause

This issue occurs because VCSA 6.0 and later versions do not have an ADAM database to remove stale license entries. VCSA 6.0 and later versions uses PostgreSQL as an embedded database from which stale entries are removed.

Resolution

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.
  1. Run this command to stop the vCenter Server service:

    service vmware-vpxd stop
     
  2. 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
         
  3. 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).

  4. 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';

  5. Execute the query for each stale entry noted in step 3.

  6. 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.
     
  7. 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.
     
  8. 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.

     
  9. 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.

     
  10. Run this command to start the vpxd service:

    service vmware-vpxd start


Additional Information

Licensing ESXi 6.x/7.0.x and vCenter Server 6.x/7.0.x
Unable to remove a license key from vCenter Server Appliance (broadcom.com)
最新回复 (0)
全部楼主
返回
发新帖