"Error while running package installation and post-install scripts" when upgrading VMware Cloud Director from 10.5.x to 10.6.x
search cancel

"Error while running package installation and post-install scripts" when upgrading VMware Cloud Director from 10.5.x to 10.6.x

book

Article ID: 404842

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • During the upgrade of VMware Cloud Director(VCD) from version 10.5.x to 10.6.x, the process fails with the error: "Error while running package installation and post-install scripts"
  • In /opt/vmware/var/log/vami/updatecli.log, you see entries similar to:

warning: /etc/profile created as /etc/profile.rpmnew
warning: /etc/sysconfig/clock created as /etc/sysconfig/clock.rpmnew
warning: /etc/sysconfig/proxy created as /etc/sysconfig/proxy.rpmnew
error: unpacking of archive failed on file /srv: cpio: File from package already exists as a directory in system
error: filesystem-1.1-4.ph4.x86_64: install failed

  • Towards the end of same log file, you may also see:

18/07/2025 01:56:50 [ERROR] Failed with exit code 65024
18/07/2025 01:56:50 [INFO] Update status: Running post-install scripts
18/07/2025 01:56:50 [INFO] Running /opt/vmware/var/lib/vami/update/data/job/12/post_install '10.5.1.10593' '10.6.1.11753' 4
Failed with status of 4 while installing version 10.6.1.11753
VM version is still 10.5.1.10593
18/07/2025 01:56:50 [ERROR] Failed with exit code 256
18/07/2025 01:56:50 [INFO] Update status: Running VMware tools reconfiguration
18/07/2025 01:56:50 [INFO] Running /opt/vmware/share/vami/vami_reconfigure_tools
vmware-toolbox-cmd is /bin/vmware-toolbox-cmd
vmtoolsd wrapper not required on this VM with systemd.
18/07/2025 01:56:50 [INFO] Update status: Done VMware tools reconfiguration
18/07/2025 01:56:50 [INFO] Update status: Error while running package installation and post-install scripts
18/07/2025 01:56:50 [ERROR] Failure: updatecli exiting abnormally
18/07/2025 01:56:50 [INFO] Install Finished

Environment

VMware Cloud Director

Cause

This issue occurs when the srv path exists as a directory under the root partition instead of the expected symbolic link (symlink) to /var/srv on the VCD cell where the upgrade is failing.

Resolution

Verify the srv directory structure:

  • Run the command on the VCD cell where the upgrade failed: ls -lrth /
  • If you see output like the following, it indicates that /srv is incorrectly configured as a directory:

drwxr-xr-x 13 root root 4.0K Apr 5 2023 var
drwxr-xr-x 3 root root 4.0K May 17 2023 home
drwxr-xr-x 4 root root 4.0K Nov 4 2023 opt
drwxr-xr-x 3 root root 4.0K Mar 12 2024 srv
drwx------ 3 root root 4.0K Aug 22 2024 vasecurity
drwxr-xr-x 4 root root 1.0K Aug 22 2024 boot
drwxr-x--- 5 root root 4.0K Jul 18 11:36 root
drwxrwxrwt 13 root root 320 Jul 18 11:58 tmp

  • The correct setup should display srv as a symbolic link pointing to /var/srv, like this:

drwxr-xr-x 13 root root 4.0K Apr 5 2023 var
drwxr-xr-x 3 root root 4.0K May 17 2023 home
drwxr-xr-x 4 root root 4.0K Nov 4 2023 opt
drwx------ 3 root root 4.0K Aug 22 2024 vasecurity
drwxr-xr-x 4 root root 1.0K Aug 22 2024 boot
drwxr-x--- 5 root root 4.0K Jul 18 11:36 root
drwxrwxrwt 13 root root 320 Jul 18 11:58 tmp
lrwxrwxrwx 1 root root 8 Jul 18 11:45 srv -> var/srv/

To resolve the issue:

  • Navigate to root directory on the problematic cells: cd /
  • Delete the "srv" directory from the problematic cells: rm -rf srv
    Note: Ensure there is no critical data within this directory before proceeding. If there is any data inside srv directory, please take a backup of the directory.
  • Create respective symlink pointing to var/srv: ln -s var/srv srv
  • Re-attempt the upgrade