vCenter Server Patching Fails During Staging with "Error copying packages"
search cancel

vCenter Server Patching Fails During Staging with "Error copying packages"

book

Article ID: 376735

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • vCenter VAMI page reports the below error while staging:

 

  • Attempts to patch the VMware vCenter Server fail during the staging process. The following log entries can be observed in /var/log/vmware/applmgmt/PatchRunner.log:

    [YYYY-MM-DDT HH:MM:SS,927] Downloading RPM vmware-eam-7.0.3.02000-13507391.x86_64.rpm
    [YYYY-MM-DDT HH:MM:SS,934] Downloading RPM vmware-identity-sts-7.0.3.27000-13282826.noarch.rpm 
    [YYYY-MM-DDT HH:MM:SS,565] Staging failed. Retry to resume from the current state. Or please collect the VC support bundle.

                "requirements": {
                    "questions": [],
                    "rebootRequired": false,
                    "requiredDiskSpace": {
                        "/storage/core": 109.25557327270508,
                        "/storage/seat": 362.4875

    YYYY-MM-DDT HH:MM:SS.502Z INFO vmware_b2b.patching.phases.discoverer Check if there is enough storage for RPM installation

  • The following error strings can be observed in /var/log/vmware/applmgmt/update_microservice.log:

    YYYY-MM-DDT HH:MM:SS,161 - 38623 - dbfunctions:: executeDML: 54 - DEBUG - Executing Query {UPDATE meta SET _isdownloaded = 1, _downloadendtime = DATETIME('now') WHERE _name = ? } with parameters ('vsphere-ui-7.0.3.01900-12788923.noarch.rpm',)
    YYYY-MM-DDT HH:MM:SS,197 - 38623 - rpmfunctions:: isChecksumValid: 356 - ERROR - Checksum does not match, expected [c0d91f241d5f6843c372c8dc040f177cc378d2fad1d14581a51597764d3c773e], found [54d429a593d8f2a7f5b4feca734d442628d615b7ecb58f8836a8b4472f7b3a1d]
    YYYY-MM-DDT HH:MM:SS,198 - 38623 - rpmfunctions:: downloadRpm: 642 - ERROR - Checksum failed for RPM {vsphere-ui-7.0.3.01900-12788923.noarch.rpm}
    YYYY-MM-DDT HH:MM:SS,198 - 38623 - update_b2b:: _copyPackages:1030 - ERROR - Exception: name 'dbsqlstatements' is not defined

Environment

VMware vCenter Server

Cause

This failure occurs when the checksum validation of the ISO fails due to an incorrect SHA checksum, or when there is insufficient storage space on critical appliance partitions (e.g., /storage/core or /storage/seat).

Resolution

To resolve this issue, the underlying space or checksum problems must be validated before resetting the patching environment.

Phase 1: Environment Validation

  • Verify the available space within the vCenter Server Appliance using the command: df -h. If any appliance partition is found to be running out of space, it must be expanded or cleared.

  • Verify the integrity of the downloaded ISO file by validating its SHA256 sum and comparing it against the published sum in the release notes or sha256sum.txt.

Phase 2: Clear the Staging Environment Once space and integrity are verified, the corrupted staging files must be purged.

(Note: Alternatively, the vCenter Server can be reverted to an offline snapshot taken prior to the patching attempt.)

  1. Connect to the vCenter Server via SSH and log in as root.

  2. Create a backup copy of the software update state file in a safe location:
    #cp /etc/applmgmt/appliance/software_update_state.conf /storage/core/software_update_state.conf.bak

  3. Stop the appliance management service:
    #service-control --stop applmgmt

  4. Remove the corrupted update files and database entries (Note: If a file or directory does not exist, proceed to the next command):
    #rm -r /storage/core/software-update/*
    #rm -rf /storage/updatemgr/software-*
    #rm /etc/applmgmt/appliance/software_update_state.conf
    #rm /storage/db/patching.db*

  5. Start the appliance management service:
    #service-control --start applmgmt

  6. Retry the patch update process.