update: 26. 04. 2016
Pozice: Linux / ESXi / ESXi a NUT /
Spojení serveru ESXi s linuxovým serverem (službou) NUT.
Stránka projektu
Pozor návod je psaný pro 1.1.0
ale již je k dispozici verze 1.4.0
ReadME: Network UPS Tools client for VMWare ESXi 5.0-5.1
Author : Rene Garcia Date : 23-02-2013 Release: 1.1.0 Licence: GPL2 PURPOSE Provide UPS connectivity to a single vSphere Hypervisor 5.0.0 Will shut down properly the host and vms if a NUT server tells that the power supply has gone and the UPS battery level is critical. INSTALL - Enable SSH on the hypervisor. - Copy via scp this TAR archive to /tmp directory of the hypervisor - Connect via ssh to the hypervisor and type the followind commands cd /tmp tar -xzvf NutClient-ESXi500-1.1.0.tar.gz ./upsmon-install.sh - No need to reboot, upsmon can be started immediatly but you need to configure it first - You can delete tmp files and disable SSH on the hypervisor UPDATE - Same as install but use ./upsmon-update.sh UNINSTALL - Same as install but use ./upsmon-remove.sh CONFIGURATION - Start vSphere Client and go to configuration tab of the hypervisor - Open Advanced Parameters and go to UserVars - Configure these parameters to match your needs : UserVars.NutUpsName : UPS name on remote NUT server UserVars.NutUser : Username to connect to NUT server UserVars.NutPassword : Username password on NUT server UserVars.NutSendMail : Set to 1 if you want a mail to be sent on UPS event UserVars.NutMailTo : Email address to send mail to on UPS event - Now you can start and enable NUT client on hypervisor boot - On configuration tab of the hypervisor go to Security Profile - Open services properties - Select Network UPS Tools client an click on Options WARNINGS This module is provided "as is" and is not approuved by VMWare, you may lose VMWare support if you install it. Use it at your own risks. REVISIONS 1.0.0 - 26/05/2012 - internal beta release 1.0.1 - 28/05/2012 - initial release 1.0.2 - 27/06/2012 - nut updated to version 2.6.4 1.1.0 - 23/02/2013 - nut updated to version 2.6.5 - messages to syslog
INSTALATION NUT CLIENT on ESXi5
shell on esxi:~ # cd /tmp && wget http://www.mtom.cz/dl/Linux/ESXi/ESXi a NUT/NutClient-ESXi500-1.1.0.tar.gz && tar -xzf NutClient-ESXi500-1.1.0.tar.gz && sh upsmon-install.sh Installation Result Message: Operation finished successfully. Reboot Required: false VIBs Installed: Margar_bootbank_upsmon_2.6.5-1.1.0vmw.500 VIBs Removed: VIBs Skipped:
TEST CLIENT on ESXi5
shell on esxi:~ # upsc apcups@serverups battery.alarm.threshold: 0 battery.charge: 100.0 battery.charge.restart: 00 battery.date: 06/20/12 battery.runtime: 420 battery.runtime.low: 120 battery.voltage: 13.77 battery.voltage.nominal: 012 device.mfr: APC device.model: Smart-UPS 420 device.serial: NS0138142775 device.type: ups driver.name: apcsmart driver.parameter.cable: 940-0095B driver.parameter.pollinterval: 2 driver.parameter.port: /dev/ttyS3 driver.version: 2.4.3 driver.version.internal: 2.03 input.frequency: 50.00 input.quality: FF input.sensitivity: H input.transfer.high: 253 input.transfer.low: 208 input.transfer.reason: unacceptable utility voltage rate of change input.voltage: 233.2 input.voltage.maximum: 233.2 input.voltage.minimum: 233.2 output.voltage: 233.2 output.voltage.nominal: 230 ups.delay.shutdown: 020 ups.delay.start: 000 ups.firmware: 21.6.I ups.id: UPS_MTOM ups.load: 068.9 ups.mfr: APC ups.mfr.date: 09/20/01 ups.model: Smart-UPS 420 ups.serial: NS0138142775 ups.status: OL ups.test.interval: 1209600 ups.test.result: NO
CONFIGURATION UPSMON on ESXi5
on vSphere:- Start vSphere Client and go to configuration tab of the hypervisor - Open Advanced Parameters and go to UserVars - Configure these parameters to match your needs : UserVars.NutUpsName : UPS name on remote NUT server UserVars.NutUser : Username to connect to NUT server UserVars.NutPassword : Username password on NUT server UserVars.NutSendMail : Set to 1 if you want a mail to be sent on UPS event UserVars.NutMailTo : Email address to send mail to on UPS event - Now you can start and enable NUT client on hypervisor boot - On configuration tab of the hypervisor go to Security Profile - Open services properties - Select Network UPS Tools client an click on Options
SHOW RUN UPSMON CONFIGURATION on ESXi5
shell on esxi, if runing upsmon~ # cat /etc/ups/upsmon.conf # Network UPS Tools: upsmon configuration # Change this to match your upsd server MONITOR apcups@serverups 1 name passw slave MINSUPPLIES 1 SHUTDOWNCMD "poweroff" NOTIFYCMD "/etc/ups/notify.sh" POLLFREQ 5 POLLFREQALERT 5 HOSTSYNC 15 DEADTIME 15 POWERDOWNFLAG /etc/killpower NOTIFYFLAG ONLINE SYSLOG+EXEC NOTIFYFLAG ONBATT SYSLOG+EXEC NOTIFYFLAG LOWBATT SYSLOG+EXEC NOTIFYFLAG FSD SYSLOG+EXEC NOTIFYFLAG COMMOK SYSLOG NOTIFYFLAG COMMBAD SYSLOG NOTIFYFLAG SHUTDOWN SYSLOG+EXEC NOTIFYFLAG REPLBATT IGNORE NOTIFYFLAG NOCOMM IGNORE NOTIFYFLAG NOPARENT SYSLOG+EXEC RBWARNTIME 43200 NOCOMMWARNTIME 300 FINALDELAY 5
UNINSTALATION NUT CLIENT from ESXi5
shell on esxi:~ # cd /tmp && wget http://www.mtom.cz/dl/Linux/ESXi/ESXi a NUT/NutClient-ESXi500-1.1.0.tar.gz && tar -xzf NutClient-ESXi500-1.1.0.tar.gz && sh upsmon-remove.sh
Soubory ke stažení
Nazev | typ | Delka | Vytvořeno |
---|---|---|---|
NutClient-ESXi500-1.4.0.tar | gz | 669 KB | 21. 04. 2016 |
NutClient-ESXi500-1.1.0.tar | gz | 46 KB | 22. 05. 2013 |