This issue is resolved in VMware vSphere ESXi 6.7 Patch release ESXi670-202004002 available at
Customer Connect Patch Downloads.
Workaround:
To work around this issue if you do not want to upgrade:
- Copy the script attached restart-nicmgmtd.sh to a specific location and modify the permission to execute.
chmod +x restart-nicmgmtd.sh
Note: The attached script periodically monitors the memory usage of nicmgmtd and restarts the nicmgmtd when the nicmgmtd memory usage is nearing the memory limit.
- Get the process id of the crond:
For example:
[root@prme-hs2-m0911:/vmfs/volumes/5cb1899b-e6fab534-16c9-248a0756de00/nicmgmtd] cat /var/run/crond.pid
2106975
- Stop the process.
For example:
[root@prme-hs2-m0911:/vmfs/volumes/5cb1899b-e6fab534-16c9-248a0756de00/nicmgmtd] /bin/kill 2106975
- Edit the cron job file to add new job to the cron daemon:
File name: /var/spool/cron/crontabs/root
For example:
[root@prme-hs2-m0911:/vmfs/volumes/5cb1899b-e6fab534-16c9-248a0756de00/nicmgmtd] vi /var/spool/cron/crontabs/root
*/5 * * * * /vmfs/volumes/datastore1/nicmgmtd/restart-nicmgmtd.sh /vmfs/volumes/datastore1/nicmgmtd/nicscript.log
-----> This would make the crond to run the restart daemon script once in every 5 minutes.
Note: The script file take an optional parameter which is the path to a log file to log script executions or failures.This is an optional parameter. If nothing is specified as parameter, it would log the stdout. This can be ignored by:
*/5 * * * * /vmfs/volumes/datastore1/nicmgmtd/restart-nicmgmtd.sh > /dev/null 2>&1
- Restart the crond daemon by running this command:
/usr/lib/vmware/busybox/bin/busybox crond
- Once the crond is started after the changes, the script would be in execution monitoring the eminpeak page table value of nicmgmtd. If it hits the predetermined 500k, it would restart the nicmgmtd. This way, there will not be any log spew in the vmkernel.log file.
Notes:
- The changes made to the file /var/spool/cron/crontabs/root, is not persistent across reboots. So based on the , if you wish these changes to persist across reboot, then the below entries would have to be made to local.sh file.
file path: /etc/rc.local.d/local.sh
Below are the entries:
# workaround script to restart nicmgmtd when it hits the memory limit
/bin/kill $(cat /var/run/crond.pid)
/bin/echo '*/5 * * * * /vmfs/volumes/datastore1/nicmgmtd/restart-nicmgmtd.sh /vmfs/volumes/datastore1/nicmgmtd/nicscript.log' >> /var/spool/cron/crontabs/root
/usr/lib/vmware/busybox/bin/busybox crond
- The location of the script file and its log file would have to be decided based on your preference.
- The local.sh file gets executed only for non secure boot.