Before restoring a vCenter Server instance, you must retrieve the vCenter Server root and vCenter Single Sign-On administrator credentials from the SDDC Manager inventory. Before restoring the Management domain vCenter Server, you must also retrieve the credentials of a healthy Management domain ESXi host.

Before you can query the SDDC Manager API, you must obtain an API access token by using admin@local account.

Prerequisites

Note:

If SDDC Manager is not operational, you can retrieve the required vCenter Server root, vCenter Single Sign-On administrator, and ESXi root credentials from the file-based backup of SDDC Manager. See Prepare for Restoring SDDC Manager.

Procedure

  1. Log in to your host machine with access to the SDDC and open a terminal.
  2. Obtain the API access token.
    1. Run the command to obtain an access token by using the admin@local credentials.
                      
      TOKEN=`curl https://<sddc_manager_fqdn>/v1/tokens -k -X POST -H "Content-Type: application/json" -d '{"username": "admin@local","password": "admin@local_password"}' | awk -F "\"" '{print $4}'`

      The command returns an access token and a refresh token.

    2. Record the access token.
  3. Retrieve the vCenter Server root credentials.
    1. Run the following command to retrieve the vCenter Server root credentials.
                      
      curl https://<sddc_manager_fqdn>/v1/credentials?resourceType=VCENTER -k -X GET \-H "Accept: application/json" -H "Authorization: Bearer $TOKEN" | json_pp

      The command returns the vCenter Server root credentials.

      Setting

      Value

      domainName

      Name of the domain

      resourceName

      FQDN of the vCenter Server

      username

      root

      password

      vcenter_server_root_password

    2. Record the vCenter Server root credentials.
  4. Retrieve the vCenter Single Sign-On administrator credentials.
    1. Run the following command to retrieve the vCenter Single Sign-On administrator credentials.
                      
      curl https://<sddc_manager_fqdn>/v1/credentials?resourceType=PSC -k -X GET \-H "Accept: application/json" -H "Authorization: Bearer $TOKEN" | json_pp

      The command returns the [email protected] credentials.

      Setting

      Value

      domainName

      Name of hte domain

      resourceName

      FQDN of the vCenter Server

      username

      [email protected]

      password

      vsphere_admin_password

    2. Record the [email protected] credentials.
  5. If you plan to restore the management domain vCenter Server, retrieve the credentials for a healthy management domain ESXi host.
    1. Run the following command to retrieve the credentials for a management domain ESXi host.
                      
      curl https://<sddc_manager_fqdn>/v1/credentials?resourceType=ESXI -k -X GET \-H "Accept: application/json" -H "Authorization: Bearer $TOKEN" | json_pp

      The command returns the ESXi root credentials.

      Setting

      Value for first ESXi host

      domainName

      management domain name

      resourceName

      FQDN of the first ESXi host

      username

      root

      password

      esxi_root_password

    2. Record the ESXi root credentials.