VCSA upgrade from 8.x to 9.1 using CLI Installer fails with the error: "Failed to get session, exiting"
search cancel

VCSA upgrade from 8.x to 9.1 using CLI Installer fails with the error: "Failed to get session, exiting"

book

Article ID: 441157

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • When upgrading vCenter Server from 8.x to 9.1 using the CLI installer (vcsa-deploy.exe), the process fails while creating a session with the source vCenter.

  • CLI installer logs reports:

    YYYY-MM-DD HH:MM:SS,### - vCSACliInstallLogger - INFO - Invoking get session API: https://source_vcenter.example.com:443/rest/com/vmware/cis/session
    YYYY-MM-DD HH:MM:SS,### - vCSACliInstallLogger - INFO - Received status 401: {"type":"com.vmware.vapi.std.errors.unauthenticated","value":{"error_type":"UNAUTHENTICATED","challenge":"SIGN realm=\"##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##\",sts=\"https://source_vcenter.example.com/sts/STSService/vsphere.local\", Basic realm=\"vCenter\"","messages":[]}}
    YYYY-MM-DD HH:MM:SS,### - vCSACliInstallLogger - ERROR - Failed to get session, exiting. Error: Failed to get session, exiting
    YYYY-MM-DD HH:MM:SS,### - vCSACliInstallLogger - ERROR - Traceback (most recent call last):
      File "d:\build\ob\bora-25234746\src\bora\install\vcsa-installer\vcsaCliInstaller\cli_tasks\common_utils\rdu_utils.py", line 94, in get_session
    Exception: Failed to get session, exiting

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "main.py", line 412, in <module>
      File "main.py", line 383, in main
      File "d:\build\ob\bora-25234746\src\bora\install\vcsa-installer\vcsaCliInstaller\workflow_engine.py", line 369, in prepare_workflow
      File "d:\build\ob\bora-25234746\src\bora\install\vcsa-installer\vcsaCliInstaller\cli_tasks\common_utils\rdu_utils.py", line 296, in get_source_versions
      File "d:\build\ob\bora-25234746\src\bora\install\vcsa-installer\vcsaCliInstaller\cli_tasks\common_utils\rdu_utils.py", line 99, in get_session
    Exception: Failed to get session, exiting. Error: Failed to get session, exiting

    YYYY-MM-DD HH:MM:SS,### - vCSACliInstallLogger - ERROR - Error message: Failed to get session, exiting. Error: Failed to get session, exiting

  • The /var/log/vmware/sso/vmware-identity-sts.log on the source vCenter shows: "Failed to authenticate principal [root] for tenant [vsphere.local] Caused by: com.vmware.identity.idm.InvalidPrincipalException: Principal id not found: {Name: root, Domain: }"

Environment

VMware vCenter Server 9.1

Cause

The vCenter 9.1 CLI Installer attempts to authenticate with SSO using the 'root' account. This authentication fails if the Default Identity Source on the source vCenter is set to an external source (like Active Directory) rather than LocalOS.

Resolution

Broadcom is aware of this issue and a fix is targeted for a future release. To receive updates, please subscribe to this article.

Workaround

  1. Update Default Identity Source
    1. Log in to the vSphere Client as [email protected].
    2. Navigate to Administration > Single Sign-On > Configuration.
    3. On the Identity Sources tab, select localos.
    4. Click Set Default Domain and save the changes.
    5. Relaunch the CLI upgrade

  2.  Use Legacy Upgrade Framework option:
    The CLI installer in 9.x defaults to the Reduced Downtime Upgrade (RDU). Bypass this by forcing the legacy upgrade method using the following argument: 

    Syntax: vcsa-deploy.exe upgrade --upgrade-framework legacy [path_to_template]

For detailed syntax and examples, view the Techdoc