Unable to Add/Delete Files from Content Library After Changing vCenter GUID
search cancel

Unable to Add/Delete Files from Content Library After Changing vCenter GUID

book

Article ID: 382015

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Adding/Deleting files from Content Library fails with the error: 
    A general runtime error occurred. An error occurred: vCenter Server AF####E-###B-4###-###1-############ is not available on the server.




  • Unable to add/delete files in Content Library after changing the vCenter GUID from uppercase to lowercase.

  • Verify whether the vCenter GUID appears in lowercase in the location /etc/vmware-vpx/instance.cfg from the vCenter SSH session using the below command:-
    grep instanceUuid /etc/vmware-vpx/instance.cfg

Environment

VMware vCenter Server 8.x

Cause

In VCDB, content library storageuri is pointing to Uppercase vCenter GUID

Resolution

Update the storageuri's in vCenter DB such that it references lower case vCenter GUID

The steps to follow are: -

  1. Take a snapshot of the vCenter.

  2. Verify the vCenter GUID using the below command from the vCenter SSH session.
    grep instanceUuid /etc/vmware-vpx/instance.cfg

    Sample Output: -
    instanceUuid=af###e-###b-4###-###1-############

     

  3. Connect to the VCDB by running the below command.
    /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres

     

  4.  Verify if content library storageuri's in VCDB are pointing to correct vCenter GUID.
    select * from cl_storage;

    Sample Output: -
                      id                  |                            storageuri                            |   type
    --------------------------------------+------------------------------------------------------------------+-----------
     95####7-5##1-4##9-8###-c########47c | Datastore:datastore-2#####5:AF####E-###B-4###-###1-############ | Datastore
     50####41-0##6-###a-###0-#########f92 | Datastore:datastore-2#####6:AF####E-###B-4###-###1-############  | Datastore
     86####a5-2##2-4##f-8##6-#########eb9 | Datastore:datastore-3#####5:AF####E-###B-4###-###1-############  | Datastore
     51#####b-f##7-4##d-a##5-#########b1f | Datastore:datastore-3#####5:AF####E-###B-4###-###1-############  | Datastore
    (4 rows)

    From the above output, it shows vCenter has 4 content libraries, and AF####E-###B-4###-###1-############ is the vCenter GUID currently displayed in uppercase. This is impacting the content library functionality. We need to change this to lowercase.

  5. Make a backup of cl_storage by running the below command.
    copy cl_storage to '/var/core/cl_storage_backup';

     

  6. Update the cl_storage file using the below command to change the vCenter GUID from upper case to lower case.
    update cl_storage set storageuri='<storageuri output from Step#4 with lower case vCenter GUID>' where id='<id from step#4>';

    Sample:

    update cl_storage set storageuri='Datastore:datastore-2#####5:af####e-###b-4###-###1-############' where id='95####7-5##1-4##9-8###-c########47c';

     

  7. Repeat the above command for all content libraries from Step 4 that points to upper case vCenter GUID.