In my home Lab recently appear first ESXi server. For now, it is a fairly simple design, disk resources are made available from the Synology NAS. Both devices (NAS and ESXi) are plugged into the UPS CyberPower BS650E. Synology fully supports UPS (connected via USB) and can respond well to current decays. And what about the ESXi? Here we have the right solution. This solution is a ESXi client for Network UPS Tools prepared by Rene Garcia. The client (UPS Mon) is of course flexible and is able to connect to any NUT server. In this post I will describe the connection to the NUT running on Synology DSM.
On the Synology nothing to install, just check if our UPS is properly operated and enable the “Network UPS server”.
An IP address is the address of our ESXi 5.5. In the next step, download the NUT client installation file to the server. Before you install the client, think about whether you will be able to restart the ESXi? Restart is not mandatory, the client can run immediately. Advanced options introduced by the installer are visible in ESXi 5.5 settings after a reboot. If you can not restart ESXi, we need to set the appropriate options (default) directly in the file upsmon-install.sh. Correct the first three options, the appropriate permissions from Synology are stored in the file /usr/syno/etc/ups/upsd.users.
esxcfg-advcfg -A string -E -T NutUpsName NUT ups remote name (eg: upsname @ nutserver) -F firstname.lastname@example.org
esxcfg-advcfg -A -T string NutUser -E, NUT username to connect to remote ups -F monuser
esxcfg-advcfg -A string -E -T NutPassword NUT password to connect to remote ups -F secret
Of course nas.piszki.lab is the name of my Synology. After entering the correct default options as root, install client (sh upsmon-install.sh). Next log in to the ESXi server by vSphere client and under Configuration-> Security profile-> Firewall check whether the rule is enabled for UPS Mon:
If you set the proper options in the file upsmon-install.sh you can immediately start the client in the Configuration-> Security Profiles-> Services-> Network UPS Tools:
If this is not done, then after Esxi reboot, we can go to the Configuration-> Advanced-> UserVars and set the appropriate options, a reminder: The default parameters for Synology is:
ups@IP/FQDN monuser secret
All the necessary parameters can also be set from the vCenter Web client. At the end we can test on the ESXi console if everything is working properly (by command upsc ups@IP):
In case of problems, I recommend a long discussion in the comments under the Rene post.