Yes, yes, I know … NSX-V is a little long in the tooth, but there is still a large install base out there. Additionally, it still has general support until 2022-01-16, and I fully expect there to be many customers still using it well after that date. With all of that being considered, I figured I would share this tidbit in the event that it helps someone else.
Recently, I was fiddling about in my home lab with the intent of testing some NSX-V related alerting with LogInsight. When setting up the syslog server in NSX-V Manager, I came across what appears to be a bug, albeit not documented. In short, if the second part of the FQDN used for a syslog server starts with a digit, you’ll receive the error “Invalid IP or hostname”.
Some quick testing / troubleshooting can quickly narrow the issue down to a digit being the first character in the second part of a FQDN. As pictured below, if I put a letter in there as the first character (3rd row), it will accept it. I ended up testing all digits, 0-9, and received the same result. The QA tester in me was hoping that one of the digits (7, for example) would be accepted;)
Also of note, is that KB 79044 describes a similar symptom. However, that KB is specifically for the NSX Controllers and not the NSX Manager.
With the help of support, we opted to verify that we could set the value using the API. To do this, I fired up a Putty session to SSH into the NSX Manager, and we had to go into Tech Support Access mode to run the following. Standard disclaimer: tech support mode grants you a lot of power. If you aren’t positive or comfortable with performing actions using these elevated permissions, you should contact VMware support immediately.
First, we dumped a copy of the current config to a text file:
curl -k -u 'admin' -H 'Content-Type:application/xml' -H 'Accept:application/xml' -X GET https://127.0.0.1/api/1.0/appliance-management/system/syslogservers | xmllint --format - >> /tmp/syslogservers_delete.xml
Next, we used vi to edit the file to add the FQDN for the syslog server:
After saving that, we then ran a curl command again, this time with a “PUT” so that it would write the config change:
curl -k -u 'admin' -H 'Content-Type:application/xml' -H 'Accept:application/xml' -X PUT https://127.0.0.1/api/1.0/appliance-management/system/syslogservers -d '@/tmp/syslogservers_delete.xml'
If all goes according to plan, you should now see your syslog server showing up within NSX Manager:
Of note is that if you click the Edit button, it will look like the server has disappeared:
Fortunately, this is largely a cosmetic issue and not a functionality issue. Given how close we are to NSX-V’s end of support, I wouldn’t hold my breath on getting this fixed.