NSX-T: How To Modify Compute Manager Credentials (API/GUI)

·

·

During the NSX-T deployment process, you have specified at least one compute manager. To do that you will use the a local administrator account or even better a dedicated service account to couple for example your vCenter to the NSX-T Manager.

But what if you want to start using another account?

In the underneath blog I’m explaining the different possible ways for different NSX-T versions

Prior NSX-T 3.0

There is no way to edit the credentials within the GUI. The only way to change the compute manager credentials is via the
NSX-T Data Center REST API.

To gather the necessary information about the concerning compute managers, perform the following API call. Personally I use Postman to execute these requests

Please adjust the parameters to match your environment.

GET https://{{NSX Manager}}/api/v1/fabric/compute-managers/

After collecting the above information you could start modifying the compute manager credentials.

PUT https://{{NSX Manager}}/api/v1/fabric/compute-managers/94ab93d4-bbae-437c-9fd2-dfb98e356a2f

To execute the API request you need to provide at least the following (example) body. This is where you specify the new account or password. Adjust the body to match your own environment.

 {
  "id": "94ab93d4-bbae-437c-9fd2-dfb98e356a2f ",
  "server": "10.0.2.100",
  "origin_type": "vCenter",
  "display_name": "vCenter",
  "credential": {
      "credential_type" : "UsernamePasswordLoginCredential",
      "username": "sa_nsxt@vsphere.local",
      "password": "VMware1!",
      "thumbprint": "CD:F7:A5:60:3D:A6:4B:E3:5E:A8:5B:8C:97:0E:DB:F7:17:8E:A6:C3:17:9D:A1:EC:BC:0F:5C:74:2B:CA:AD:31"
  },
  "_revision": 0
}

Attention:

  • Display_name is an optional parameter, but when you do not specify it, the request will change the display name to the ID of the compute manager.
  • Maybe obvious, but always specify username + domain. If the domain is not specified you get an error:
Bad request nsx-t api

More info about the API: https://code.vmware.com/apis/1083/nsx-t

NSX-T 3.0+

As from NSX-T 3.0, it is possible to modify the compute manager credentials from the GUI. After creating the initial compute manager, select it again and click Edit.

Click Edit next to ‘FQDN or IP Address and fill in again the username and password fields.

Click save. Done.

The options “Create Service Account” and “Enable Trust” are required when you would like to prepare an NSX-T Cluster with vSphere Lifecycle Manager.


UP NEXT: NSX-T Manager reaction when changing the service account password or removing the service account

During the setup of my home lab, I was accidentally triggered about the NSX-T manager reaction when I removed the entire service account. Before I share it in a blogpost, I would like to investigate it more in depth. I would like to be sure that it is reproducible and no coincidence.