Deploying VM/OVF/OVA or Template from Content Library displays error: Unable to process template
search cancel

Deploying VM/OVF/OVA or Template from Content Library displays error: Unable to process template

book

Article ID: 378737

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Deploying VM/OVF/OVA or Template Local (Publisher) Content Library throws Error: Unable to process template while selecting Compute resource
  • Deployment task is seen stuck at 0% without progress
  • Creating Test Content Library dose not get created and task for creation is not initiated (Task not created)

  • The issue can also be seen as inability of the publishing and subscribing content-libraries to sync and ability to deploy templates.
  • Content library sync activity stays stuck at 1%
  • Following log snippet may be seen in /var/log/vmware/content-library/cls.log or vsphere_client_virgo.log:

com.vmware.vapi.std.errors.not_found or Library [UUID] not found.

Environment

VMware vCenter server

Cause

This occurs due to failed, pending or stale tasks in the Content Library database in the vCenter Database (VCDB) 

Resolution

Note: if the vCenter is in Linked mode, make sure to take Offline Snapshot's of all Linked Mode vCenter VM's

 

It is recommend restarting the vmware-content-library service first as it often resolves transient "Unable to process template" errors without database intervention.

service-control --stop vmware-content-library

service-control --start vmware-content-library

 

If restarting the service doesn't resolve the issue, check for failed or pending or stale tasks at the Content Library from VCDB using below commands:

  • Use below command to enter VCDB
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
  • Run below command to identify the failed or pending or stale tasks
select count(*) from cl_simple_activity;
select count(*) from cl_vcenter_task;

Note: cl_simple_activity is the stale entries on the content Library (Pending tasks, failed tasks and total total activities performed) & cl_vcenter_task is the total tasks currently pending to be executed from Content Library.

Example Image below

  • Clear the stale entries by running the below command
    • Stop the content library service
service-control --stop vmware-content-library
    • Enter the VCDB
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
    • Delete the cl_simple_activity & cl_vcenter_task from the above example shared with below command's
delete from cl_simple_activity;
delete from cl_vcenter_task where state ='queued';
    • Start the content library service
service-control --start vmware-content-library

 

After the database cleanup, the user may need to manually trigger a "Sync" or "Sync Item" to re-populate the state correctly.

Additional Information

Related KBs:

Subscribed Content Library synchronization fails with error INVALID_ELEMENT_TYPE"

Content Library sync or delete fails with RuntimeFault.summary and NonUniqueResultException