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 AFXXXXE-XXXB-4XXX-XXX1-XXXXXXXXXXXX is not available on the server.'

  • Unable to add/delete files in Content Library after changing the vCenter GUID from uppercase to lowercase.
  • Verify that the vCenter GUID appears in lowercase in the below location

/etc/vmware-vpx/instance.cfg
/etc/vmware-vpx/instance.cfg | grep instanceUuid

Environment

vCenter 8.x

Cause

In VCDB, content library storageuri is pointing to Uppercase vcGuid

Resolution

Update VCDB so the content library references lower case vcGuid

  • Take a Snapshot of vCenter 
  • Verify the vcGuid , using below command

grep instanceUuid /etc/vmware-vpx/instance.cfg
instanceUuid=afxxxxe-xxxb-4xxx-xxx1-xxxxxxxxxxxx

  • Connect to the VCDB by running below command from the vCenter Server Appliance

/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres

  •  Verify if content library storageuri in VCDB is pointing to correct vcguid

VCDB=# select * from cl_storage;
                  id                  |                            storageuri                            |   type
--------------------------------------+------------------------------------------------------------------+-----------
 95xxxx7-5xx1-4xx9-8xxx-cxxxxxxxx47c | Datastore:datastore-2xxxxx5:AFXXXXE-XXXB-4XXX-XXX1-XXXXXXXXXXXX | Datastore
 50xxxx41-0xx6-xxxa-xxx0-xxxxxxxxxf92 | Datastore:datastore-2xxxxx6:AFXXXXE-XXXB-4XXX-XXX1-XXXXXXXXXXXX  | Datastore
 86xxxxa5-2xx2-451f-8cf6-92892adfceb9 | Datastore:datastore-3xxxxx5:AFXXXXE-XXXB-4XXX-XXX1-XXXXXXXXXXXX  | Datastore
 51xxxxxb-fxx7-428d-aad5-b8312b34ab1f | Datastore:datastore-3xxxxx5:AFXXXXE-XXXB-4XXX-XXX1-XXXXXXXXXXXX  | Datastore
(4 rows)

From the above output, it shows vCenter has 4 content libraries, and AFXXXXE-XXXB-4XXX-XXX1-XXXXXXXXXXXX is the vcGuid currently displaying in uppercase. This is impacting the content library functionality. We need to change this to lowercase.

  • Make a Backup of cl_storage,

VCDB=# copy cl_storage to '/var/core/cl_storage_backup';

  • Update the file using below command (change vGUID from upper case to lower case)

VCDB=# update cl_storage set storageuri='Datastore:datastore-2xxxxx5:afxxxxe-xxxb-4xxx-xxx1-xxxxxxxxxxxx  where id='95xxxx7-5xx1-4xx9-8xxx-cxxxxxxxx47c ';

  • Repeat the above command for all content library that points upper case vGUID