Today I was struggling with an ESX host. The ESX host was unable to leave the Windows domain. I got the following error:
From the vSphere client I was unable to fix this issue. Apply Host profile failed also with the same error. So I started a search in the VMware KB and found an article about problems while attempting to join a Windows domain. In this article you’ll find a way to clean up the AD configuration from the CLI.
The solution for me was to stop the lsassd service:
Remove the db directory:
and start the lasassd service again:
Now I was able to leave the Windows domain.