Change VMware NSX Controller Settings

0

If you are looking into NSX especially in a lab environment, the resource requirements for the NSX virtual infrastructure is quite costly.  Especially with high availability, you are looking at steep memory and CPU requirements.  Also, if you look to edit the properties of the NSX controllers, you will notice that you can’t edit the virtual machine properties of these – they are greyed out both in the full vSphere client as well as the web client.  Let’s look and see how we can change VMware NSX controller settings.

nsxedit01 Change VMware NSX Controller Settings

Change VMware NSX Controller Settings

Unfortunately, there isn’t a really easy way to take off the restriction which is imposed by vCenter in this case.  We have to perform low level edits to the vPostgres database.  Also, a challenge to this process is that we need to get the VM-ID of the VMs in question before we can perform the DB edits we need to eliminate the restrictions.  ***Note*** This is unsupported by VMware and any edits to the database at a low level need to be performed with caution.  If it is a lab environment most likely these can be performed without worry.

Find the VM-ID

The easiest way really to find the VM-ID is to download a utility called RVTools.  RVTools makes finding the VM-ID and other information extremely easy to do.  The other method which isn’t as easy is to login to the MOB interface for vSphere or your host and find it that way.  With RVTools, just connect the utility up to vSphere and it will query and pull the information for you.

nsxedit02 Change VMware NSX Controller Settings

Once we have the VM-ID from vSphere, we can now run our edit on the vPostgres DB.  Follow the steps below to gain access to vPostgres.  We have to enable the shell first, and then connect to the DB after.

Enable the Shell

  • shell.set –enabled true
  • type shell
  • Browse to /etc/vmware-vpx/
  • Edit the file embedded_db.cfg
  • You will find your vc password in this file – save this password off to the clipboard or notepad

Now use your VM-ID that you found with the RVTools utility in the queries below.

Queries

To verify entries exist for the VM in question to restrict vSphere actions.  ***Note*** You will replace the “vm-35” with your VM-ID from RVTools.

sudo /opt/vmware/vpostgres/9.3/bin/psql -d VCDB vc -c "select * from VPX_DISABLED_METHODS WHERE ENTITY_MO_ID_VAL = 'vm-35';"

You should see results for the query.  Now we can delete these restrictions:

sudo /opt/vmware/vpostgres/9.3/bin/psql -d VCDB vc -c "delete from VPX_DISABLED_METHODS WHERE ENTITY_MO_ID_VAL = 'vm-35';"

Once these are deleted, simply restart vCenter services:

service vmware-vpxd restart

After performing the steps above, you should now be able to edit the settings of your NSX controllers.

nsxedit03 Change VMware NSX Controller Settings

Final Thoughts

In your home or work lab, you may have limited resources to play around with so being able to tweak the settings on all virtual appliances including the ability to change VMware NSX controller settings is a valuable tool.  With the steps above you should be able to edit the vPostgres DB and remove the restrictions  without issue.