Journey to VCIX-NV – Part 2 – Deploying and Editing NSX Controllers Settings


The next components to deploy are the NSX Controllers. These are the main components of the NSX Platform Control Plane.

NSX Controllers can be deployed as a single instance (not recommended for production) or in a cluster of three nodes. They’re deployed by the NSX Manager itself, with just few clicks in the NSX Manager GUI.

For lab environments, you can deploy just a single instance of the NSX Controller and you will be fine. If you want to deploy three of them, you might hit a problem with resource contention, because it requires 4 vCPUs, 4 GB of RAM and 2 GB RAM Reservation by default and you can’t edit the VM Settings.

I found a blog post of Tom Fojta about downsizing NSX Controllers (In that post, you’ll find different resource settings as it was previous version of NSX). The problem is you can’t change any VM settings. Tom advised the following:

delete respective records from vCenter Server VPX_DISABLED_METHODS table.

I have vCenter Appliance in my lab with embedded vPostgres DB. So it was a bit tricky to do that and it is not supported in production:

  1. We need VM-ID of all controller VMs. Get them from Managed Objects Explorer (MOB Interface: https://vCenter_IP_or_FQDN/mob).
  2. SSH into you vCenter Appliance using root account, then enable Bash Shell using shell.set –enabled true, then enter Bash Shell mode using shell.
  3. We need the admin password on vPostgres DB. Browse to /etc/vmware-vpx/. List all files there using ls command. You will find two files: embedded_db.cfg and vcdb.properties.
    embedded_db.cfg contains general attributes of vPostgres server as well as postgres superuser credentials. vcdb.properties contains info about vCenter DB as well as vc user credentials. Show any of these files using cat file_name command. In our case, we need vc user credentials, so I used vcdb.properties (screenshot below doesn’t show the password, I blanked it).Tet0
  4. Now, we need to delete the records from vPostgres DB. Browse to /opt/vmware/vpostgres/, then list all folder in using ls command. In my case it was 9.3 (I’m not sure if it’s general for each vCenter Appliance 6.0U2, but it might be the version number of vPostgres DB used in the appliance).
    Tet01
  5. Browse into that folder, then into /bin/. Use the following command to delete the records from VPX_DISABLED_METHODS table:
    ./psql -d VCDB vc -c “select * from VPX_DISABLED_METHODS WHERE ENTITY_MO_ID_VAL = ‘VM-ID’;”
    It’ll ask for vc user credential got from step 2.
  6. Repeat for all controllers then restart vCenter Server Service using service vmware-vpxd restart.

When I returned back to vCenter Web Client, I found that I can edit any Controller VM settings. I reduced the resources required after shutting down each Controller VM.

What I tested in my lab:

  • Deploying Cluster of NSX Controllers (3 Nodes).
  • Discovering NSX Controllers CLI Commands.

The following diagram is showing how my lab looks like at this stage (click here to view in full size or download)

NSX03

Another Workaround:

I found that my friend Giuliano Bertello had also his own approach to reduce Controller VMs resources consumption in his nice and simple article.

References:

** Exploring VCSA embedded PostgreSQL database by Nebojsa Ilic.
** VMware KB Article 2008957.

 


Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.