Skip to main content

Vmware ESXi 6.x NUT Client Installation and Configuration

Requirements

  • SSH must be enabled on your ESXi installation
  • Community acceptance level must be enabled on your ESXi installation in order to install the client

Download

Download the latest NutClient-ESXi-x.x.x-x.x.x-offline_bundle.zip package from: https://github.com/rgc2000/NutClient-ESXi/releases.

InstallationInstall

    • Secure copy the NutClient-ESXi-x.x.x-x.x.x-offline_bundle.zip to your ESXi server’s /tmp directory by either using WinSCP/pscp in Windows or scp in Linux.
    • Set ESXi Community Acceptance level:
esxcli software acceptance set --level=CommunitySupported

    If

  1. Untaryou NutClient-ESXi-2.x.x.tar.gz:
  2. get
the following error:

tar -xzf[AcceptanceConfigError]
 NutClient-ESXi-2.x.x.tar.gzSecure Boot enabled: Cannot change acceptance level to community.
 Please refer to the log file for more details.

    You must disable Secure Boot in your computer BIOS and re-try the installation again.

    • Install Client:bundle:
shesxcli upsmon-install.shsoftware vib install -d /tmp/NutClient-ESXi-x.x.x-x.x.x-offline_bundle.zip
    • If installation was successful you should see the following output:
Installation Result

   Message: Operation finished successfully.

   Reboot Required: false

   VIBs Installed: Margar_bootbank_upsmon_2.7.4-2.1.0Margar_bootbank_upsmon_x.x.x-x.x.x

   VIBs Removed:

   VIBs Skipped:
    • You can now delete the files in the /tmp directory and disable the SSH service if desired.

ESXi Configuration

    • In the ESXi Web client, navigate to Host —> Manage —> System —> Advanced Settings. In the Search box enter UserVars.Nut (Figure 1).

Figure 1

image-1647104283497.png

    • Configure the following variables:
    1. NutUpsName: Name of the UPS on the NUT server (in the form of inverter_name@server_name or server_ip). Several inverters can be entered separated by a space. There will be no system shutdown until the last UPS still standing has given the shutdown command.
    2. NutUser: Name of the NUT server login account
    3. NutPassword: NUT Server Connection Account Password
    4. NutFinalDelay: Seconds to wait after receiving the low battery event to shut down the system
    5. NutSendMail: Set to 1 for the NUT client to send an e-mail to each important event of the UPS
    6. NutMailTo: E-mail address to send UPS events to
    • In the ESXi Web client, navigate to Host —> Manage —> Services —> NutClient —> Actions —> Policy —> Start and Stop with Host (Figure 2).

Figure 2

image-1647104294686.png

    • In the ESXi Web client, navigate to Host —> Manage —> Services —> NutClient —> Actions —> Start (Figure 3).

Figure 3

image-1647104306878.png

Tips

  • Use the ESXi host configuration tab in the vSphere Client to decide how to start and stop (or suspend) virtual machines. This order will be respected by the UPS shutdown procedure.
  • The clean shutdown of the OS in the virtual machines is only possible if the vmware tools are installed.
  • To uninstall the NUT client, use the upsmon-removefollowing script that is in the file that you downloaded:command:
/tmpesxcli #software shvib upsmon-remove -n upsmon
  • To update the NUT client, use the following command:
esxcli software vib update -d /tmp/NutClient-ESXi-x.x.x-x.x.x-offline_bundle.zip
  • To estimate the time needed for the server to shut down on UPS alert, type the command below on the host ESXi (by ssh or on the console). The shutdown procedure is immediately started:
/opt/nut/sbin/upsmon -c fsd
  • If the NUT Client is configured correctly, the ESXi /var/log/syslog.log should have a message similar to below where ups@UPSHOST is the ups name and the UPS host you setup earlier :
2019-09-22T13:28:07Z upsmon[2111424]: Communications with UPS ups@UPSHOST established