How to remove a Imported domain from VCF 9.0
search cancel

How to remove a Imported domain from VCF 9.0

book

Article ID: 436924

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer

Issue/Introduction

This KB provides the steps to remove an imported domain from VCF as a troubleshooting step.

Environment

VMware Cloud Foundation 9.x

Resolution

Follow the steps below to perform the workaround:

1. Gather the Domain UUID from SDDC Manager

  1. Open the SDDC Manager UI.

  2. Navigate to Inventory > Workload Domains and select the domain that needs to be removed.

  3. Note the Domain ID from the browser URL.

2. Remove NSX from the SDDC inventory (Note: SKIP THIS STEP IF NSX IS SHARED WITH OTHER DOMAINS.)

  1. Take a snapshot of the SDDC Manager Appliance 
  2. SSH into the SDDC Manager Appliance with vcf and then elevate to root with su.
  3. Remove the NSX Cluster for the Domain from the SDDC inventory 

    curl -i -X DELETE http://localhost/inventory/extensions/vi/nsxtclusterdomains/<domain-id from Step 1(c)>

3. Decommission the ESXi hosts from the SDDC Manager UI.

Decommission ESX Hosts

Please see the additional information to decommission the hosts via API

4.Remove the Domain from the SDDC inventory.

  1. Take a snapshot of the SDDC Manager Appliance 
  2. SSH into the SDDC Manager Appliance with vcf and then elevate to root with su.
  3. Remove the Domain from the SDDC Manager.

    curl -s -X DELETE http://localhost/inventory/extensions/vi/domains/<domain-id from Step 1(c)>

 

5. Clean up the vCenter MOB 

  1. Navigate to https://<vCenter-FQDN>/mob and log in with vCenter administrator credentials. 

    Note: If vCenter MOB is disabled the follow KB 401669 to enable it.

  2. Click Content > ExtensionManager.
  3. Under the Properties section, verify that extensionList ["com.vmware.sddcManager"] is present in the VALUE column.



  4. Scroll to the Methods section and click UnregisterExtension.
  5. Enter com.vmware.sddcManager in the parameters value box.



  6. Click Invoke Method in the bottom right corner. Close the pop-up and refresh the ExtensionManager page to ensure it is removed.

Additional Information

Remove hosts from the domain via API

  1. SSH into the SDDC Manager with vcf and then elevate to root.
  2. Generate API Token

    TOKEN=$(curl -H 'Content-Type:application/json' https://localhost/v1/tokens -d '{"username" : "<SSO_USERNAME>","password":"<SSO_Password>"}' -k | jq -r '.accessToken')
  3. Retrieve the host IDs and save them to a json file.

    curl -k -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -X GET https://localhost/v1/hosts?domainId=<Domain UUID from step 1(c)> 2>/dev/null | jq '[.elements[] | {id: .id}]' | tee hostids.json

  4. Execute the decommission trigger:

curl -s -X DELETE http://localhost/inventory/extensions/decommission/hosts -H "Content-Type: application/json" -d @hostids.json