vcenter 8.X Patching fails with "Exception occurred in postInstallHook for vmafd-patch Please check the logs for more details. Take corrective action and then resume."
search cancel

vcenter 8.X Patching fails with "Exception occurred in postInstallHook for vmafd-patch Please check the logs for more details. Take corrective action and then resume."

book

Article ID: 374811

calendar_today

Updated On:

Products

VMware vCenter Server 8.0

Issue/Introduction

  • During the vCenter patching activity, the process is stuck at 80% and is producing the error: "Exception occurred in postInstallHook for vmafd-patch Please check the logs for more details. Take corrective action and then resume."

 

  • In /var/log/vmware/applmgmt/PatchRunner.log we see below mentioned error:
YYYY-MM-DDThh:mm:ss.msZ vmafd-patch:Patch ERROR vmafd-patch.utils Failed to restart service lwsmd 
YYYY-MM-DDThh:mm:ss.msZ vmafd-patch:Patch ERROR vmware_b2b.patching.executor.hook_executor Patch hook 'vmafd-patch:Patch' failed.
Traceback (most recent call last):
  File "/storage/seat/software-updatecqx_cnbk/stage/scripts/patches/py/vmware_b2b/patching/executor/hook_executor.py", line 74, in executeHook
    executionResult = systemExtension(args)
  File "/storage/seat/software-updatecqx_cnbk/stage/scripts/patches/libs/sdk/extensions.py", line 106, in __call__
    result = self.extension(*args)
  File "/storage/seat/software-updatecqx_cnbk/stage/scripts/patches/libs/sdk/extensions.py", line 123, in _func
    return func(*args)
  File "/storage/seat/software-updatecqx_cnbk/stage/scripts/patches/payload/components-script/vmafd-patch/__init__.py", line 479, in patch
    utils.restart_svc('lwsmd')
  File "/storage/seat/software-updatecqx_cnbk/stage/scripts/patches/payload/components-script/vmafd-patch/utils.py", line 462, in restart_svc
    raise Exception('Failed to restart service %s ' % serviceName)
Exception: Failed to restart service lwsmd 
  • In /var/log/vmware/likewise/likewise.log we see below mentioned error:
YYYY-MM-DDThh:mm:ss.msZ INFO lwsm: Likewise Service Manager startup complete
YYYY-MM-DDThh:mm:ss.msZ INFO lwsm: Starting service: netlogon
YYYY-MM-DDThh:mm:ss.msZ WARNING netlogon: [0x7f000f849740] Warning: invalid/incomplete registry key 'HKEY_THIS_MACHINE\Services
\netlogon\cachedb\xxx.xxxx'

Environment

VMware vCenter Server 8.0.x

Cause

Corrupt entries in the likewise registry causing service lwsmd not to restart properly

This issue can occur if the vCenter server had been previously joined to the domain and is now no longer joined.

Resolution

 Note: Please be advised that we strongly recommend creating offline i.e.(powered off) snapshots of all the vCenter Servers in ELM setup before implementing below mentioned steps. If the vCenter server is standalone, then take a normal snapshot. (Do not run this on the Failed Patch Vcenter)

  • SSH to vCenter with root
  • Stop netlogon  with command:    

        /opt/likewise/bin/lwsm stop netlogon  

  • After stopping netlogon now clear the cachdb tree

         /opt/likewise/bin/lwregshell delete_tree '[HKEY_THIS_MACHINE\Services\netlogon\cachedb]'

  • Start netlogon  with command:    

          /opt/likewise/bin/lwsm start netlogon 

Note: the cachedb key will not exist if the vCenter server has never been joined to the domain