Auto generated password retrieval from VCF Installer 9.1 appliance
search cancel

Auto generated password retrieval from VCF Installer 9.1 appliance

book

Article ID: 388719

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

Retrieve auto generated passwords via CLI if the VCF Installer UI is no longer accessible after a VCF 9.1 deployment.

Environment

VMware Cloud Foundation 9.1

Resolution

  • User interface extraction

    1. Navigate to the interface URL:

      https:///vcf-installer-ui/portal/getting-started

    2. Under Deploy > View Details 
    3. Then grab the passwords from the JSON on the installer page. 

  • Use curl commands to pull the passwords: 

    1. SSH into the VCF Installer which should now be the SDDC Manager Appliance with the vcf user and su to root. 
    2. Run the following commands to obtain the token:

      TOKEN=$(curl -k -X POST https://localhost/v1/tokens -H "Content-Type:application/json" -d '{"username": "admin@local","password": ""}' | jq -r '.accessToken')

    3. Retrieve the ID of the latest deployment : 

      curl -k -X GET "https://localhost/v1/sddcs/latest" -H "Authorization: Bearer $TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" | jq

    4. Grab the VCF Operations deployment JSON which contains the passwords: 

      curl -k -X GET "https://localhost/v1/sddcs/<ID from previous command>/spec" -H "Authorization: Bearer $TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" | jq | less