vCenter Hostname change fails with error: Service did not set the task state
search cancel

vCenter Hostname change fails with error: Service did not set the task state

book

Article ID: 412445

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • vCenter hostname change via VAMI fails with error.

         

  • Under /var/log/vmware/applmgmt/applmgmt.log, below logs are available:

    YYYY-MM-DDTHH:MM:SS PM UTC [XXXX]DEBUG:vmware.appliance.networking.impl:com.vmware.appliance.version1.networking.dns.hostname.get()

    YYYY-MM-DDTHH:MM:SS PM UTC [XXXX]DEBUG:vmware.appliance.networking.impl:com.vmware.appliance.version1.networking.dns.servers.get()
    YYYY-MM-DDTHH:MM:SS PM UTC [XXXX]INFO:vmware.appliance.networking.utils:Checking if FQDN: <vCenter FQDN> resolves to <IP Address>
    YYYY-MM-DDTHH:MM:SS PM UTC [XXXX]INFO:vmware.appliance.networking.utils:Successfully resolved FQDN to IP
    YYYY-MM-DDTHH:MM:SS PM UTC [XXXX]INFO:root:Setting the same IP config for nic0.
    YYYY-MM-DDTHH:MM:SS PM UTC [XXXX]DEBUG:vmware.vapi.task.task_manager_impl:Removing task XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:com.vmware.appliance.networking
    YYYY-MM-DDTHH:MM:SS PM UTC [XXXX]INFO:root:stdout:
    Error: LW_ERROR_DOMAIN_IS_OFFLINE [code 0x00009cb9]

    The domain is offline

    YYYY-MM-DDTHH:MM:SS PM UTC [XXXX]INFO:vmware.vapi.lib.thread_pool:Thread-1 (_worker) caught exception: <class 'KeyError'>
    YYYY-MM-DDTHH:MM:SS PM UTC [XXXX]INFO:vmware.vapi.lib.thread_pool:Traceback (most recent call last):
       File "/usr/lib/applmgmt/vapi/lib/vapi_runtime-2.100.0-py2.py3-none-any.whl/vmware/vapi/lib/thread_pool.py", line 147, in _worker
        work_item.ret = work_item.fn(
       File "/usr/lib/applmgmt/vapi/lib/vapi_runtime-2.100.0-py2.py3-none-any.whl/vmware/vapi/bindings/skeleton.py", line 302, in _invoke_method
        result = method(**method_args)
       File "/usr/lib/applmgmt/networking/py/vmware/appliance/networking/network_info_impl.py", line 266, in change
        task_handle, progress = create_task(newPnid = newPnid)
       File "/usr/lib/applmgmt/networking/py/vmware/appliance/networking/pnid/pnid_utils.py", line 1640, in create_task
        task_handle = get_task_handle(Info, IdType())
       File "/usr/lib/applmgmt/vapi/lib/vapi_runtime-2.100.0-py2.py3-none-any.whl/vmware/vapi/task/task_handle.py", line 190, in get_task_handle
        return TaskHandle(info_type, result_type)
       File "/usr/lib/applmgmt/vapi/lib/vapi_runtime-2.100.0-py2.py3-none-any.whl/vmware/vapi/task/task_handle.py", line 45, in __init__
        self._initialize_common_info()
       File "/usr/lib/applmgmt/vapi/lib/vapi_runtime-2.100.0-py2.py3-none-any.whl/vmware/vapi/task/task_handle.py", line 51, in _initialize_common_info
        summary = self.task_manager.get_summary(self.task_id)
       File "/usr/lib/applmgmt/vapi/lib/vapi_runtime-2.100.0-py2.py3-none-any.whl/vmware/vapi/task/task_manager_impl.py", line 123, in get_summary
        return self.task_map[task_id]
     KeyError: '724ab1f5-d24d-443e-a615-14078d5cecb1:com.vmware.appliance.networking'

    (END)

  • Query to check the vCenter Domain join status gives below output: 

    #/opt/likewise/bin/domainjoin-cli query

    Error: LW_ERROR_DOMAIN_IS_OFFLINE [code 0x00009cb9]

    The domain is offline

Cause

There are several causes for this issue, such as:

  • The system is unable to establish contact with the original Active Directory domain or its Domain Controller.

  • Connectivity to the source domain or its respective Domain Controller has been lost.

  • The previous domain's infrastructure is no longer active, having been either decommissioned or entirely removed.

     

  • The source Active Directory domain to which the system was joined has been retired or no longer exists.

  • The original domain has been taken offline or permanently dissolved.

  • Domain Controller IP changed, or source domain no longer exists.

Resolution

Note: Take Snapshot of the vCenter server (Offline Snapshot of all the vCenter servers if in linked mode).

  1. Access VCSA via SSH:
    • Ensure SSH is enabled on the vCenter Server Appliance (VCSA).
    • Connect to the VCSA using an SSH client (e.g., PuTTY) and log in as root.

  2. Disjoin from Active Directory:
    • Execute the following command to remove the VCSA from its current Active Directory domain:
      # /opt/likewise/bin/domainjoin-cli leave


    • You will be prompted for the domain administrator's password to complete this action.

  3. Reboot the VCSA:
    • After successfully disjoining from the domain, reboot the vCenter Server Appliance to apply the changes:
      # reboot

  4. Attempt Hostname Modification:
    • Once the VCSA has fully restarted, access the VAMI (vCenter Server Appliance Management Interface) at https://<vCenter_IP_or_old_Hostname>:5480.
    • Navigate to the networking section and retry changing the vCenter hostname.