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
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
- 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 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.
- Record the access token.
- Run the command to obtain an access token by using the admin@local credentials.
- Retrieve the vCenter Server root credentials.
- 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
- Record the vCenter Server root credentials.
- Run the following command to retrieve the vCenter Server root credentials.
- Retrieve the vCenter Single Sign-On administrator credentials.
- 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
password
vsphere_admin_password
- Record the [email protected] credentials.
- Run the following command to retrieve the vCenter Single Sign-On administrator credentials.
- If you plan to restore the management domain vCenter Server, retrieve the credentials for a healthy management domain ESXi host.
- 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
- Record the ESXi root credentials.
- Run the following command to retrieve the credentials for a management domain ESXi host.