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
- Log in to your host machine with access to the SDDC and open a terminal.
- Obtain the API access token.
- 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"}'
The command returns an access token and a refresh token.
- Record the access token.
- Run the command to obtain an access token by using the admin@local account credentials.
- Retrieve the NSX Manager root and admin credentials.
- Run the command to retrieve the NSX Manager root and admin credentials.
curl 'https://<sddc_manager_fqdn>/v1/credentials?resourceType=NSXT_MANAGER' -i -X GET -H 'Accept: application/json' -H 'Authorization: Bearer access_token'
The command returns the NSX Manager root and admin credentials.
- Record the NSX Manager root and admin credentials for the instance you are restoring.
- Run the command to retrieve the NSX Manager root and admin credentials.