NSX-T workflows may fail if the ESXi hostnames are added in SDDC Manager with uppercase FQDNs
search cancel

NSX-T workflows may fail if the ESXi hostnames are added in SDDC Manager with uppercase FQDNs

book

Article ID: 324086

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

Symptoms:
The follow workflows may fail in SDDC Manager if an ESXi Host was added to the inventory with an upper case FQDN. 
  • Add host(s) to an NSX-T cluster.
  • Remove host(s) to an NSX-T cluster.
  • Add a cluster to a NSX-T Workload Domain.
  • Remove a cluster from a NSX-T Workload Domain.
  • Remove a NSX-T Workload Domain.


Environment

VMware Cloud Foundation 3.8.x

Cause

As vCenter will automatically change the case of the FQDN to lower case once an ESXi host has been added to the the inventory, this leads to a case sensitivity discrepancy and results in the workflow failure. 

Resolution

This is a known issue, please use the below workarounds for the specific workflow failure.

Workaround:
 Add ESXi host(s) to a NSX-T cluster
  1. Open an SSH to the SDDC Manager VM and change to the root user:
su -
  1. With the below command, fetch all the ESXI hosts from SDDC Manager inventory and output to esxi-host-inventory.json file :
curl -k https://{sddc-manager-ip}/inventory/extensions/vi/esxis -u ' : ' | json_pp > esxi-host-inventory.json
  1. Open esxi-host-inventory.json with a text editor and identify the host(s), which belong to the NSX-T cluster, which the host(s) are to be added.
  2. Identify the hosts to be added to the cluster.
  3. Rename the identified hostnames into lowercase and save the file.
  4. Run the below command to update ESXi hostnames to lowercase in SDDC Manager inventory.
curl -k -H "Content-Type: application/json" -X PUT -d @esxi-host-inventory.json https://{sddc-manager-ip}/inventory/extensions/vi/esxis -u 'UserName:Password'
  1. Execute the Add Host workflow.
After the workflow has been completed successfully, revert the hostname to the original name:
  1. Fetch all the ESXI from SDDC Manager inventory into a nsxt-host-revert.json file.
curl -k https://{sddc-manager-ip}/inventory/extensions/vi/esxis -u 'UserName:Password' | json_pp > esxi-host-inventory-revert.json
  1. Open esxi-host-inventory-revert.json with a text editor and identify the hosts for the NSX-T cluster, which have been added.
  2. Rename the ESXi hosts hostname to the original case and save the file.
  3. Run the command below to update SDDC Manager inventory:
curl -k -H "Content-Type: application/json" -X PUT -d @esxi-host-inventory-revert.json https://{sddc-manager-ip}/inventory/extensions/vi/esxis -u 'UserName:Password'

Remove ESXi host(s) to a NSX-T cluster
  1. Open an SSH to the SDDC Manager VM and change to the root user:
su -
  1. With the below command, fetch all the ESXI hosts from the SDDC Manager inventory and output to a deleteHost.json file:
 curl -k https://{sddc-manager-ip}/inventory/extensions/vi/esxis -u 'UserName:Password' | json_pp > deleteHost.json
  1. Open deleteHost.json with a text editor and identify the host(s) to be removed.
  2. Rename the identified host(s) hostname(s) to the lowercase and save the file.
  3. Update the ESXi entries by executing the below command.
curl -k -H "Content-Type: application/json" -X PUT -d @deleteHost.json https://{sddc-manager-ip}/inventory/extensions/vi/esxis -u 'UserName:Password'
  1. Execute remove host workflow.
Add cluster to a NSX-Workload Domain

In this workflow, it's required to rename all hostnames which belongs to NSXT Workload domain to lowercase:
  1. Open an SSH to the SDDC Manager VM and change to the root user:
su -
  1. Using the command below, fetch all ESXi hosts from the SDDC Manager inventory to a nsxt-vi-hosts-lower.json file
curl -k https://{sddc-manager-ip}/inventory/extensions/vi/esxis -u 'UserName:Password' | json_pp > nsxt-vi-hosts-lower.json
  1. Open nsxt-vi-hosts-lower.json with a text editor and Identify all the ESXi hosts which belong to the NSX-T workload domain.
  2. Identify all the ESXi hosts to be selected during the add cluster workflow.
  3. Rename the identified ESXi hosts hostnames to lowercase and save the file.
  4. Update modified hostname in the SDDC Manager inventory by executing below command:
curl -H "Content-Type: application/json" -X PUT -d @nsxt-vi-hosts-lower. json https://{sddc-manager-ip}/inventory/extensions/vi/esxis -u 'UserName:Password'
  1. Execute the add cluster workflow
Rename all ESXi hostnames, which belongs to the NSXT Workload domain, to the original case:
  1. Fetch all ESXi hosts from the SDDC Manager inventory to a nsxt-vi-hosts-revert.json file:
curl -k https://{sddc-manager-ip}/inventory/extensions/vi/esxis -u 'UserName:Password' | json_pp > nsxt-vi-hosts-revert.json
  1. Open the nsxt-vi-hosts-revert.json with a text editor and identify all the hosts which belong to the NSX-T workload domain.
  2. Rename identified hostname to the original case and save it.
  3. Update modified hostname in SDDC Manager inventory by executing below command
curl -H "Content-Type: application/json" -X PUT -d @nsxt-vi-hosts-revert. json https://{sddc-manager-ip}/inventory/extensions/vi/esxis -u 'UserName:Password'

Remove cluster from a NSX-T Workload Domain 

Rename hostnames to lowercase, where host belongs to the cluster, the user intends to delete
  1. Open an SSH to the SDDC Manager VM and change to the root user:
su -
  1. Using the command below, fetch all the ESXI hosts from the SDDC Manager inventory and output to nsxt-cluster-host.json:
curl -k https://{sddc-manager-ip}/inventory/extensions/vi/esxis -u 'UserName:Password' | json_pp > nsxt-cluster-host.json
  1. Open nsxt-cluster-host.json with a text editor and identify the hosts which belong to the NSX-T cluster that is intended to be deleted.
  2. Rename the identified ESXi hostnames to lower case and save the file.
  3. Update the hostnames in the SDDC Manager inventory by executing the below command:
curl -k -H "Content-Type: application/json" -X PUT -d @nsxt-cluster-host. json https://{sddc-manager-ip}/inventory/extensions/vi/esxis -u 'UserName:Password' Execute delete cluster workflow

Remove a NSX-T Workload Domain

Rename all hostnames ( which belongs to NSXT Workload domain) to lowercase
  1. Open an SSH to the SDDC Manager VM and change to the root user:
su -
  1. Using the command below, fetch all the ESXi hosts from  inventory to nsxt-vi-hosts-lower.json file
curl -k https://{sddc-manager-ip}/inventory/extensions/vi/esxis -u 'UserName:Password' | json_pp > nsxt-vi-hosts-lower.json 
  1. Open nsxt-vi-hosts-lower.json with a text editor and identify all the ESXi hosts which belong to the NSX-T workload domain.
  2. rename identified hostname to the lowercase and save it.
  3. Update modified hostname in VCF inventory by executing below command
curl -H "Content-Type: application/json" -X PUT -d @nsxt-vi-hosts-lower. json https://{sddc-manager-ip}/inventory/extensions/vi/esxis -u 'UserName:Password' 
  1. Execute Remove VI workflow.