Deployment of VM from Subscribed Content Library fails with error "Cannot find library item in storage backing"
search cancel

Deployment of VM from Subscribed Content Library fails with error "Cannot find library item in storage backing"

book

Article ID: 429744

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Deployment Failure: Unable to deploy Virtual Machines (VMs) or OVF templates from a Local Content Library.
  • Sync Failure: A Subscribed Content Library fails to synchronize with the Publisher.
  • Error Message: When attempting to deploy or sync an error similar to the following:
    "Failed to deploy OVF package. Cause: The operation is not allowed in the current state. Cannot instantiate library item 1f46bb47-####-####-####-e51fa7c12006 due to the failure of importing file TM-TestVM.ovf), detail error: Error exporting file TM-TestVM.ovf. Reason: Cannot find library item TM-TestVM (ID: 1f46bb47-####-####-####-e51fa7c12006) in the storage backing of library Content Library (ID: 186316b0-####-####-####-d39b7e8f265b). This error may occur due to restore of a deleted library item."
  • Verification: Checking the datastore backing the Content Library reveals that the specific OVF/VMDK files referenced in the error are missing, despite the item appearing in the vCenter inventory.

Environment

VMware vCenter Server 8.0.x

Cause

This issue occurs due to a database inconsistency. The vCenter Database (VCDB) table cl_libraryitem contains a record for the item (Template/OVA), but the corresponding physical files on the storage backing have been deleted or corrupted. Because the database record exists, vCenter attempts to access the file path and fails.

Resolution

IMPORTANT: This procedure involves modifying the vCenter Server Postgres database. Incorrect database modifications can cause serious system stability issues.

  1. Broadcom Support: It is strongly recommended to contact Broadcom Technical Support before proceeding with database modifications.
  2. Snapshot Required:

Step-by-Step Procedure:

  1. Access vCenter Shell Log in to the vCenter Server Appliance via SSH as the root user.
  2. Stop Services Stop the Content Library, vCenter Server (vpxd and UI) services to release locks on the database.
    service-control --stop vmware-content-library
    service-control --stop vpxd
    service-control --stop vsphere-ui

  3. Connect to the Database Connect to the VCDB using the Postgres utility.
    /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres

  4. Identify the Stale Item Use the id (UUID) found in the error message to verify the stale entry exists in the database. Replace 1f46bb47-####-####-####-e51fa7c12006 with the Item ID from specific error message.
    SELECT id, name, libraryid FROM cl_libraryitem WHERE id = '1f46bb47-####-####-####-e51fa7c12006';

    Output should show the item name (e.g., TM-TestVM) confirming it is the problematic entry.

  5. Delete the Stale Item Run the delete command for the specific Item ID identified in the previous step. Caution: Ensure using the correct UUID.
    DELETE FROM cl_libraryitem WHERE id = '1f46bb47-####-####-####-e51fa7c12006';

    (Repeat this step if there are multiple stale items referenced in different error logs).

  6. Exit Database Quit the Postgres interface.
    \q

  7. Start Services Start all vCenter services.
    service-control --start --all

  8. Verify and Restore Content
    • Log in to the vSphere Client.
    • Navigate to the Content Library.
    • Verify that the broken item (TM-TestVM) is no longer listed in the inventory.
    • Import: Re-import the valid template (OVA/OVF) from backup or source to the Primary Library.
  9. Resynchronize Subscribed Libraries
    • Navigate to the Subscribed Content Library.
    • Right-click the library and select Synchronize.
    • Confirm that the sync completes successfully and the new item is deployable.

Additional Information

If the issue persists or if unable to identify the correct ID, please collect a standard vCenter support bundle (vc-support) and contact Broadcom Support for further assistance.