When upgrading to vCenter Server 8x the lookup service fails to start causing the upgrade itself to fail
The lookup service prestart log will contain similar to the following (var/log/vmware/lookupsvc/prestart.log):
INFO:__main__:Executing lookupsvc prestart script
INFO:__main__:Failure granting permissions to lookupsvc VCDB role. stdout : | error : 2025-09-13 08:33:66,653 ERROR : during Generation of the diff: Invalid identifier: "Example_DB_Role"
vCenter Server 8x
This occurs when there has been a custom role created on the vCenter Database with an unsupported format.
Supported format for database role name is [A-Za-z0-9_] (alphanumeric and underscore). Any other special characters in the name is not supported and can cause this issue.
Note: Creating custom roles in the vCenter database is not recommended.
Additional information:
To resolve the issue, we have either drop the role or rename it to a supported format.
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
\du
Note: Here we should see the custom database role which was causing the issue.
DROP ROLE "Example_DB_Role";
Note: If the role has privileges on the database, then the drop role command will not succeed. To drop the role we need to remove all the privileges associated with the role.
CREATE ROLE "Example_DB_Role" login password 'my_password';
GRANT CONNECT ON DATABASE "VCDB" TO "Example_DB_Role";
GRANT USAGE ON SCHEMA vc TO "Example_DB_Role";
GRANT SELECT ON ALL TABLES IN SCHEMA vc TO "Example_DB_Role"
REVOKE SELECT ON ALL TABLES IN SCHEMA vc FROM "Example_DB_Role";
REVOKE USAGE ON SCHEMA vc FROM "Example_DB_Role";
REVOKE CONNECT ON DATABASE "VCDB" FROM "Example_DB_Role";
DROP ROLE "Example_DB_Role";
Note: The db role name can be different
ALTER ROLE "Example_DB_Role" RENAME TO "exampledbrole";
Note: After renaming the role customer has to update their solution with the new name.