SDDC Manager backup fails with KeyError: 'primaryDatastoreName' due to inventory mismatch"
search cancel

SDDC Manager backup fails with KeyError: 'primaryDatastoreName' due to inventory mismatch"

book

Article ID: 429861

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer

Issue/Introduction

  • The SDDC backup fails with the error "Backup operation failed for SDDC Manager System Configuration"
    Remediation Message: If the error condition is not a transient condition, resolve it. If you manually initiated the backup, try again. If not, the failed backup will be automatically retried

  • The following entries are seen in /var/log/vmware/vcf/sddc-support/backup-####/sos.log:

    ERROR [vcf_sos] [sddcmanagerbackup.py::export_system_configurations::170::backup-##############] Exporting SDDC Manager metadata operation failed
    ERROR [vcf_sos] [sddcmanagerbackup.py::export_system_configurations::171::backup-##############] Backup operation failed for SDDC Manager System Configuration
    ERROR [vcf_sos] [sddcmanagerbackup.py::export_system_configurations::172::backup-##############] Traceback (most recent call last):
      File "backup/sddcmanagerbackup.py", line 236, in export_metadata
      File "backup/sddcmanagerbackup.py", line 237, in <lambda>
    KeyError: 'primaryDatastoreName'

Environment

VCF 9.x

Cause

SDDC Manager file-based backups failed due to a missing primary datastore metadata reference in the system configuration.

A previous datastore change was made directly in vCenter but was not reflected or synchronized within the SDDC Manager database. When the SDDC Manager backup job triggered, the script failed to find the primaryDatastoreName key for the cluster, resulting in a fatal Python KeyError.

Resolution

This issue requires database-level verification and remediation. Contact Broadcom Support and provide the relevant diagnostic logs for further analysis and resolution.