ESXi Patch/upgrade fails with Error in purging old directory: [Errno 39] Directory not empty: '/locker/packages/var/db/locker/baseimages'
search cancel

ESXi Patch/upgrade fails with Error in purging old directory: [Errno 39] Directory not empty: '/locker/packages/var/db/locker/baseimages'

book

Article ID: 416630

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • vSphere Lifecycle Manager (vLCM) fails to remediate ESXi 7 and later

  • Error: While patching using the CLI,

             esxcli software profile update -d "/vmfs/volumes/68cb1336-cb11ae6c-fe90-ecf40c01cb2a/VMware-ESXi-7.0U3w-24784741-depot.zip" -p ESXi-7.0U3w-24784741-standard

    [DatabaseIOError]
    Error in purging old directory: [Errno 39] Directory not empty: '/locker/packages/var/db/locker/baseimages'
       filename = /locker/packages/var/db/locker

  • The folder 'baseimages' is empty and does not contain any files.

  • Manually delete (rm -rf baseimages) the folder failed with the error: “Can't remove 'baseimages': Directory not empty

Environment

VMware vSphere ESXi

Resolution

  1. Rename the existing folder

     mv baseimages baseimages.old

  2. Create a new empty directory with the same name

     mkdir baseimages

  3. Re-run the ESXi installer