When attempting to upgrade VMware vCenter Server from version 7.0 Update 3i to a newer version, the upgrade process may fail with an error indicating that the Content Library Service has stopped. This issue prevents the successful completion of the vCenter Server upgrade.
The Content Library Service relies on specific database tables and configurations to function properly. If these tables are missing, have invalid values, or the service was stopped before the upgrade, it can cause the vCenter Server upgrade to fail.
Follow these steps to connect to the vCenter Server Appliance, access the PostgreSQL database, and perform the necessary tests to verify the presence and validity of the Content Library database tables.
/opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDBSELECT table_name FROM information_schema.tables WHERE table_schema='vc' AND table_name LIKE 'cl_%';SELECT * FROM cl_config;SELECT * FROM cl_subscription;
SELECT * FROM cl_library;
SELECT * FROM cl_libraryitemhistory;SELECT * FROM cl_libraryItemVersion;SELECT * FROM cl_security_rule;SELECT * FROM cl_security_policy_rule;\d cl_library;\d cl_subscription;\d cl_libraryitemhistory;\d cl_libraryItem;\d cl_registry;\d cl_registry_project_member;\q and press Enter to exit the PostgreSQL database.exit and press Enter to close the SSH connection.Recreating the cl_subscription table
From Step 5 c. above, if no records are present, re-create the cl_subscription table
Please note that the cl_subscription table, by default, contains no records, unless a content library subscription is in place. However, if receiving the error related to this article, we're assuming the cl_subscription table has corrupted and therefore needs to be re-created:
DROP TABLE vc.cl_subscription;CREATE TABLE IF NOT EXISTS vc.cl_subscription ( id uuid NOT NULL, publishedlibraryid uuid NOT NULL, subscribedlibraryid uuid NOT NULL, subscribedlibraryname character varying(80), subscriber_vcenter_hostname character varying(255), subscriber_vcenter_https_port integer, subscriber_server_guid uuid NOT NULL, folderid character varying(80), clusterid character varying(36), resourcepoolid character varying(36), hostid character varying(36), networkid character varying(36));ALTER TABLE vc.cl_subscription OWNER TO postgres;ALTER TABLE ONLY vc.cl_subscription ADD CONSTRAINT cl_subscription_pk PRIMARY KEY (id);ALTER TABLE ONLY vc.cl_subscriptionADD CONSTRAINT cl_subscription_uk UNIQUE (publishedlibraryid, subscribedlibraryid);
GRANT ALL ON LANGUAGE plpgsql TO vcgroup;GRANT ALL ON TABLE vc.cl_subscription TO vcgroup;GRANT SELECT, INSERT, DELETE, UPDATE ON TABLE vc.cl_subscription TO cls;