Error: "FileNotFoundError: [Errno 2] No such file or directory: '.../pkg_list'" during vCenter upgrade in VMware Cloud Foundation 9.x
search cancel

Error: "FileNotFoundError: [Errno 2] No such file or directory: '.../pkg_list'" during vCenter upgrade in VMware Cloud Foundation 9.x

book

Article ID: 445888

calendar_today

Updated On:

Products

VCF Operations VMware Cloud Foundation VMware vSphere Foundation VMware vCenter Server

Issue/Introduction

  • During a VMware Cloud Foundation 9.x upgrade, the vCenter Server upgrade fails at the VCENTER UPGRADE INSTALL step.
  • The vCenter Virtual Appliance Management Interface (VAMI) displays the error: "Update installation failed, list operation is not allowed".
  • The /var/log/vmware/applmgmt/update_microservice.log file contains the following error signature:

    DEBUG applmgmt-update-microservice 288134 [vc@4413 module="script_executor" funcName="executeHook" lineNum="48"] Script 'update_script' is not regular python module. Exception
    --> Traceback (most recent call last):
    -->   File "/storage/updatemgr/software-updatet_w2jcwq/stage/update/update_b2b_target.py", line 3615, in stage_precheck
    --> FileNotFoundError: [Errno 2] No such file or directory: '/storage/core/software-update/updates/<vc_build>/pkg_list'
    -->
    --> During handling of the above exception, another exception occurred:
    -->
    --> Traceback (most recent call last):
    -->   File "/storage/updatemgr/software-updatet_w2jcwq/stage/update/dependency/vmware/vherd/base/extensibility/script_executor.py", line 46, in executeHook
    -->   File "/usr/lib/python3.11/imp.py", line 297, in find_module
    -->     raise ImportError(_ERR_MSG.format(name), name=name)
    --> ImportError: No module named 'update_script'

Environment

  • VMware Cloud Foundation 9.x
  • VMware vSphere Foundation 9.x
  • vCenter Server 9.x

Cause

This issue occurs when a previous vCenter update or staging attempt was interrupted or canceled, leaving an incomplete staging directory on the appliance.

The update engine detects the existing directory and incorrectly assumes the required package list and scripts are already present, bypassing the extraction phase and leading to missing file errors.

Resolution

To resolve this issue, the stale update metadata and staging files must be manually cleared.

  1. Take a snapshot or backup of the vCenter Server Appliance.
  2. Log in to the vCenter Server via SSH as root.
  3. Stop the Appliance Management service and remove the corrupted update files by running the following commands:
    service-control --stop applmgmt
    
    rm -rf /storage/core/software-update/updates/*
    rm -rf /storage/core/software-update/stage/*
    rm -rf /storage/db/patching.db
    mv /storage/core/software-packages/staged-configuration.json /storage/core/
    mv /etc/applmgmt/appliance/software_update_state.conf /storage/core/
    
    service-control --start applmgmt
  4. Attempt the update again.