ERROR: "A general system error occurred: The export of library item has failed. Reason: 'vc server [vCenter UUID] is not available on the server"." when trying to access content library resources after updating the vCenter UUID to lowercase
search cancel

ERROR: "A general system error occurred: The export of library item has failed. Reason: 'vc server [vCenter UUID] is not available on the server"." when trying to access content library resources after updating the vCenter UUID to lowercase

book

Article ID: 445713

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

After changing the UUID of vCenter from uppercase to lowercase the following error is present when accessing content library objects:

A general system error occurred: The export of library item db43a430-de74-49d1-9cc6-a36ec237b8b2 has failed. Reason: Error transferring files [ISO FILE NAME]. Reason: 'vc server [vCenter uppercase UUID] is not available on the server.'.

Cause

This is due to after changing the vCenter UUID from uppercase to lowercase, the content library has references to the previously uppercase vCenter UUID.

Resolution

  1. Access the vPostgres database from the vCenter Server command cli via SSH:

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

  2. Check to see what tables need to be updated:

    select * from cl_storage;

    select * from cl_metadata;

    select serverguid from cl_library where serverguid='\x<VC ID hex>';

    Note: If when running the above select statements a table comes back with 0 rows, skip the update command below for that table. 

  3. The commands to update the tables are listed below, respectively:

    update cl_storage set storageuri = replace(storageuri,'<OLD VC ID>','<VC ID>') where storageuri like '%<OLD VC ID>';

    update cl_metadata set metadata_value = replace(metadata_value,'<OLD VC ID>','<VC ID>') where metadata_value like '%<OLD VC ID>';

    update cl_library set serverguid='\x<VC ID>' where serverguid='\x<OLD VC ID hex>';

Additional Information

follow this link to help with encoding the vCenter UUID in hex.

Postgres SQL has a native encode and decode functionality if you do not want to use the above 3rd party resource. The below syntax will help you encode and decode within SQL:

To decode the existing hex value for the UUID:

  1. Run the following command to get the current hex encoded UUID from the content library table:

    select serverguid from cl_library;

  2. The next command will decode the value:

    SELECT convert_from(decode('<current VC ID hex>, 'hex'), 'UTF8');

To encode the new UUID value to hex:

  1. Run the following command to get the new hex value:

    SELECT encode('<New VC ID>, 'hex');