"eam.fault.NotAuthorized", vCenter upgrade pre-check fails with error Source vSphere ESX Agent Manager (EAM) upgrade failed to obtain EAM URLs
search cancel

"eam.fault.NotAuthorized", vCenter upgrade pre-check fails with error Source vSphere ESX Agent Manager (EAM) upgrade failed to obtain EAM URLs

book

Article ID: 461695

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Upgrading vCenter from 8.0 to 9.x fails with the following EAM pre-check error.

    Error: Source vSphere ESX Agent Manager (EAM) upgrade failed to obtain EAM URLs to check against trusted certificates by the System!



  • Logging in to the EAM MOB (https://vc_ip/eam/mob) using administrator credentials works fine, and this confirms that the EAM service is running and functional.
  • The upgrade requirements log shows the errors below:

    /var/log/vmware/upgrade/CollectRequirements_com.vmware.eam_yyyy_mm_dd_hh_mm.log

    YYYY-MM-DDTHH:MM:SS.###Z INFO eam.lib.eam-upgrade-prechecks Creating local EAM client(port=15005)
    YYYY-MM-DDTHH:MM:SS.###Z ERROR eam Failed to execute trusted certificates check..
    Traceback (most recent call last):
      File "/tmp/vmware-upgrade-temp-dirdzevEZO90d/tmpO5wjPG1MEm/payload/component-scripts/eam/lib/eam_ops.py", line 192, in retrieveUrls
        allAgencies = esxAgentMgr.agency
      File "/tmp/vmware-upgrade-temp-dirdzevEZO90d/tmpO5wjPG1MEm/payload/component-scripts/eam/lib/pyEam/VmomiSupport.py", line 595, in __call__
        return self.f(*args, **kwargs)
      File "/tmp/vmware-upgrade-temp-dirdzevEZO90d/tmpO5wjPG1MEm/payload/component-scripts/eam/lib/pyEam/VmomiSupport.py", line 385, in _InvokeAccessor
        return self._stub.InvokeAccessor(self, info)
      File "/tmp/vmware-upgrade-temp-dirdzevEZO90d/tmpO5wjPG1MEm/payload/component-scripts/eam/lib/pyEam/StubAdapterAccessorImpl.py", line 44, in InvokeAccessor
        return self.InvokeMethod(mo, info, (prop, ))
      File "/tmp/vmware-upgrade-temp-dirdzevEZO90d/tmpO5wjPG1MEm/payload/component-scripts/eam/lib/pyEam/SoapAdapter.py", line 1554, in InvokeMethod
        raise obj  # pylint: disable-msg=E0702
    eam.lib.pyEam.VmomiSupport.eam.fault.NotAuthorized: (eam.fault.NotAuthorized)

  • Running journalctl displays the following log entries:

    Command: journalctl -b 0

     [YYYY-MM-DDTHH:MM:SS.#####Z] [vim.event.EventEx] [warning] [com.vmware.vim.eam] [] [ID] [Unauthorized access by VSPHERE.LOCAL\<vCenter_FQDN> in vSphere ESX Agent Manager]

Environment

  • vCenter Server 8.0
  • vCenter 9.0 / 9.1

Cause

This issue occurs when custom access roles restrict the Administrators group's permissions on the vCenter inventory. (By default, the Administrators group has full Administrator permissions on the vCenter inventory). The upgrade pre-check uses the machine account to log in to the EAM. Because the machine account belongs to the Administrators group by default, the login fails with a "NotAuthorized" error if the group lacks Administrator privileges.

Resolution

Remove the custom role assigned to the SSO Administrators group, and assign the default "Administrator" role to the Administrators group.

  1. Login to vSphere Client.
  2. Click on vCenter root inventory and select Permissions tab.
  3. Select the Administrators group.
  4. Click EDIT.
  5. Under Role, select Administrator.
  6. Click OK.
  7. Retry the upgrade.