Remove imported edge cluster from SDDC-M inventory for a new import again
search cancel

Remove imported edge cluster from SDDC-M inventory for a new import again

book

Article ID: 427719

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer

Issue/Introduction

If the customer did not create the audit account and its password during the initial edge cluster import, the audit account will not be imported and it's creation will fail.

Environment

VCF SDDC-Manager 9.0 or later

Resolution

We have a mechanism via VCF NSX-T Edge Cluster Deployment Removal Tool to clean up an imported Edge Cluster from SDDC-Manager inventory. After inventory clean up, the customer can re-run the Edge Cluster Import for the out of band Edge to be picked up including the new Edge Node audit account.

  1. Before start anything, please take a snapshot of the SDDC-Manager VM in case a revert is needed later.
  2. Please follow detailed instruction described on VCF NSX-T Edge Cluster Deployment Removal Tool
    to download and deploy Edge Cluster Removal Tool version 0.33c on the SDDC-Manager VM.
  3. [--db-removal-only] is a newly added parameter to remove an imported Edge Cluster from the SDDC-Manager inventory.
    Below is a sample command triggered under the unzipped folder '/home/vcf/cleanup' for references. Please change accordingly.
    E.g.
    ./remove_edge_cluster.sh -u [email protected] -p '<password>' -w sddcId-1001 -c myCluster --db-removal-only -v

  4. Check and confirm the Imported OOB Edge Cluster is gone from the VCF inventory.
    Please change username and password in the following sh file as needed and run it on the SDDC-Manager VM to confirm the imported one is not reported in the response.

    #!/bin/sh
    HOSTNAME=localhost
    TARGET=/v1/edge-clusters
    CONTYPE='Content-type: application/json'
    TOKEN=$(curl $HOSTNAME/v1/tokens -H 'Content-type: application/json' -X POST -d '{"username" : "[email protected]", "password" : "<password>"}'|jq .accessToken|sed s/\"//g)
    AUTH="Authorization: Bearer $TOKEN"
    curl  -i -X GET -H "$AUTH" -H "$CONTYPE" ${HOSTNAME}${TARGET}

  5. In case the user ran a sync via API, please run the the following API call to confirm Edge Cluster attribute 'password_managed_by_vcf' is False. If needed, call NSX PUT '/api/v1/edge-clusters/{id}' to set it to False.
    Run Edge Cluster Import again to add the OOB Edge Cluster including the Edge Node passwords to the SDDC-M inventory.
    curl -k -u 'admin:<NSX_ADMIN_PASSWORD>' -H "Content-Type: application/json" -X GET  https://<NSX_IPADDRESS>/api/v1/edge-clusters