ESXi Compliance Check for an Image fails with the error 'An unknown error occurred while performing the operation'
search cancel

ESXi Compliance Check for an Image fails with the error 'An unknown error occurred while performing the operation'

book

Article ID: 407349

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • While executing the Compliance check task, below error is seen in the UI :

"An unknown error occurred while performing the operation"

  • Upon checking the log, below entries are seen in /var/run/log/lifecycle.log :

YYYY-MM-DDTHH:MM:SSZ Wa(12) lifecycle[2300558]: DepotMgr:233 Couldn't extract the ImageProfile.
YYYY-MM-DDTHH:MM:SSZ  Er(11) lifecycle[2300558]: imagemanagerctl:85 [DatabaseError]
YYYY-MM-DDTHH:MM:SSZ  Er(11)[+] lifecycle[2300558]: database disk image is malformed
YYYY-MM-DDTHH:MM:SSZ  Er(11) lifecycle[2300558]: imagemanagerctl:90 Traceback (most recent call last):
YYYY-MM-DDTHH:MM:SSZ  Er(11) lifecycle[2300558]: imagemanagerctl:90   File "/usr/lib/vmware/lifecycle/bin/imagemanagerctl.py", line 367, in software
YYYY-MM-DDTHH:MM:SSZ  Er(11) lifecycle[2300558]: imagemanagerctl:90     t.ScanImage(swSpec, opts.depots,opts.taskId)
YYYY-MM-DDTHH:MM:SSZ  Er(11) lifecycle[2300558]: imagemanagerctl:90   File "/lib64/python3.11/site-packages/vmware/esximage/Transaction.py", line 2019, in ScanImage
YYYY-MM-DDTHH:MM:SSZ  Er(11) lifecycle[2300558]: imagemanagerctl:90     enableQuickPatch=self._enableQuickPatch).scan()
YYYY-MM-DDTHH:MM:SSZ  Er(11) lifecycle[2300558]: imagemanagerctl:90   File "/lib64/python3.11/site-packages/vmware/esximage/ImageManager/Scanner.py", line 3329, in scan
YYYY-MM-DDTHH:MM:SSZ  Er(11) lifecycle[2300558]: imagemanagerctl:90     self.task.updateNotifications([notif])
YYYY-MM-DDTHH:MM:SSZ  Er(11) lifecycle[2300558]: imagemanagerctl:90   File "/lib64/python3.11/site-packages/lifecycle/task.py", line 119, in updateNotifications
YYYY-MM-DDTHH:MM:SSZ Er(11) lifecycle[2300558]: imagemanagerctl:90 sqlite3.DatabaseError: database disk image is malformed

Cause

The above errors could be seen when there is an issue with the Scratch Partition configuration on the ESXi host.

Resolution

Validate the Scratch Partition Configuration by running the following command on a SSH session to the ESXi host:

vim-cmd hostsvc/advopt/view ScratchConfig.ConfiguredScratchLocation

 

Check for any misconfigurations like:

  • Scratch partition location might have been set to another ESXi host in the environment.
  • Validate by browsing to the Scratch location and see if its accessible.
  • Validate if there are any broken symlinks by running the command: ls -ltrh / on a SSH session to the ESXi host.