Before restoring a failed NSX Manager instance, you must retrieve the NSX Manager root and admin credentials from the SDDC Manager inventory.

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

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 account credentials.
      curl 'https://<sddc_manager_fqdn>/v1/tokens' -k -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"username" : "service_user","password" : "service_user_password"}'
      
      
      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 an access token and a refresh token.

    2. Record the access token.
  3. Retrieve the NSX Manager root and admin credentials.
    1. Run the command to retrieve the NSX Manager root and admin credentials.
      curl '<sddc_manager_fqdn>/v1/credentials?resourceType=NSXT_MANAGER' -i -X GET \-H 'Accept: application/json' \ -H 'Authorization: Bearer access_token'
      
      
      curl https://<sddc_manager_fqdn>/v1/credentials?resourceType=NSXT_MANAGER -k -X GET \-H "Accept: application/json" -H "Authorization: Bearer $TOKEN" | json_pp

      The command returns the NSX Manager root and admin credentials.

    2. Record the NSX Manager root and admin credentials for the instance you are restoring.