Template sync fails with "VC identifier can't be null" error in VMware Cloud Director
search cancel

Template sync fails with "VC identifier can't be null" error in VMware Cloud Director

book

Article ID: 447205

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • When synchronizing a catalog, one or more items fail to synchronize and the status becomes unknown.
  • Synchronizing individual incomplete items results in the following error:

    VC identifier can't be null.

Environment

VMware Cloud Director 10.5.x

Cause

Individual catalog items are missing vCenter details, which may include the identity of the vCenter, the inventory folder, or both.

Resolution

If the underlying vSphere infrastructure is configured correctly, the cell management tool can be used to update the catalog items with the appropriate details:

  1. Log into the command line of a VMware Cloud Director cell using the root account either via SSH or using the virtual machine console.
  2. Execute the following command:

    /opt/vmware/vcloud-director/bin/cell-management-tool find-db-anomalies

  3. A message similar to the following will be displayed for affected items:

    Affected entity: VM_CONTAINER.sg_id = <>, VM_CONTAINER.name = <>
    Corruption: (vm_container.vmfolder_vc_id IS NULL OR vm_container.vmfolder_moref IS NULL)
    Query Description: VAPP or VPP_TEMPLATE <> vmfolder_moref and/or vmfolder_vc_id is NULL in vm_container table.
    Suggested Fix:
    Run the following SQL statement:
    SQL- UPDATE vm_container SET vmfolder_vc_id = '<>', vmfolder_moref = '<>' WHERE sg_id='<>';
    Would you like to run proposed fix (Y/N): 

  4. Enter Y to accept the change.
  5. Retry the synchronization of the catalog item, if there are no errors.

 

There can be situations where the item is damaged beyond repair by this mechanism. If this does not correct the issue, remove the subscribed catalog from VMware Cloud Director and recreate subscription.

If the issue is still occurring, contact Broadcom Support for assistance and note this Article ID (447205) in the problem description. For more information, see Creating and managing Broadcom support cases