Removing an ESXi host from a domain fails with the error: The operation is not allowed in the current state
search cancel

Removing an ESXi host from a domain fails with the error: The operation is not allowed in the current state

book

Article ID: 306597

calendar_today

Updated On: 12-04-2024

Products

VMware vSphere ESXi

Issue/Introduction

  • Cannot remove an ESXi host from a domain
  • Attempting to remove an ESXi host from a domain fails
  • Navigating to Configuration > Authentication Services > Properties in vCenter Server and selecting Leave Domain fails with the error:

    The operation is not allowed in the current state.

  • In the vCenter /var/log/vmware/vpxd/vpxd.log file, log entries may show:

    [VpxLRO] -- FINISH task-56358 -- host-1703 -- vim.host.ActiveDirectoryAuthentication.leaveCurrentDomain -- ########-####-####-####-########F3AA(########-####-####-####-########B6B4)
    [VpxLRO] -- ERROR task-56358 -- host-1703 -- vim.host.ActiveDirectoryAuthentication.leaveCurrentDomain: vim.fault.InvalidState:
    Result:
    (vim.fault.InvalidState) {
    dynamicType = <unset>,
    faultCause = (vmodl.MethodFault) null,
    msg = "The operation is not allowed in the current state.",

Note: For more information on the location of log files, see Location of vCenter Server log files.

Resolution

To resolve this issue, try restarting the management services on the host. For more information, see Restarting the Management agents on an ESXi or ESX host.
 
If the issue persists even after restarting the management services, delete the contents of the /etc/likewise/db directory.
 
To delete the contents of the /etc/likewise/db directory:
  1. Connect to the ESXi host using SSH. For more information, see Connecting to an ESX host using a SSH client.
  2. Stop the lsassd service:

    /etc/init.d/lsassd stop

    Note: For more information on lsassd, see Enabling logging for Likewise agents on ESX/ESXi.

  3. Create a backup folder for the db directory:

    mkdir /etc/likewise/db_backup

  4. Move the files from the db directory to the backup directory:

    mv /etc/likewise/db db_backup

  5. Start the lsassd service:

    /etc/init.d/lsassd start
Note: If the issue persists even after trying the steps in this article, file a support request with VMware by Broadcom Support.