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.
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.
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.
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.