
Configuring an EATON UPS on vSphere
In this document we will see a simple way to configure a shutdown in our VMware vSphere virtual infrastructure if we have a UPS from the manufacturer EATON. To do this, we will need to have an appliance beforehand VMware vMA, where we will install Intelligent Power Protector (PPI) and he will be in charge of sending ordered shutdowns to our ESXi hosts.
First things, Ports 4679TCP would have to be opened, 4679UDP, 4680TCP, 4680UDP, 80tcp and 5000tcp to allow traffic to the vMA IPP by running:
sudo iptables -I OUTPUT -p tcp –Shadow Shade 80 -j ACCEPT
sudo iptables -I OUTPUT -p tcp –Shadow Shade 5000 -j ACCEPT
sudo iptables -I INPUT -p tcp –Shadow Shade 4679 -j ACCEPT
sudo iptables -I INPUT -p tcp –Shadow Shade 4680 -j ACCEPT
sudo iptables -I INPUT -p udp –Shadow Shade 4679 -j ACCEPT
sudo iptables -I INPUT -p udp –Shadow Shade 4680 -j ACCEPT
We will also allow communication between IPP and UPS connection adapters (BD/X-Slot/PXGX2000):
sudo iptables -I INPUT -p udp –Shadow Shade 161 -j ACCEPT
sudo iptables -I INPUT -p udp –Shadow Shade 200 -j ACCEPT
sudo iptables -I INPUT -p udp –Shadow Shade 2844 -j ACCEPT
sudo iptables -I INPUT -p udp –Shadow Shade 2845 -j ACCEPT
sudo iptables -I OUTPUT -p udp –Shadow Shade 161 -j ACCEPT
sudo iptables -I OUTPUT -p udp –Shadow Shade 200 -j ACCEPT
sudo iptables -I OUTPUT -p udp –Shadow Shade 2844 -j ACCEPT
sudo iptables -I OUTPUT -p udp –Shadow Shade 2845 -j ACCEPT
We record in iptables with: service iptables save
We download the Intelligent Power protector from the EATON website (currently the version 1.10) for Linux & VMware ESX/ESXi (in RPM), we upload it to the vMA appliance with WinSCP and install it with:
sudo rpm -i ipp-linux-1.10.045-1.x86_64.rpm
We open a browser against the IP address of the vMA appliance using the 4679 (for HTTP) or 4680 (for https) with the default user 'admin’ and password 'admin'.
If we do not see our UPS we will perform a scan from: 'Quick scan', 'Range scan’ o 'Address(is) Scan, Once found, we activate it from “Set as power source” (we will configure this with each UPS we have).
We will indicate the UPS, your credentials and we'll indicate a shutdown type (Shutdown, Hibernate, Power off or Script), In this case I'll make a script to shut down 3 Hosts simultaneously.
We can use a script to turn off the hosts we are interested in in /usr/local/Eaton/IntelligentPowerprotector/bin/ and recommended with a user created specifically with shutdown permissions:
/usr/local/Eaton/IntelligentPowerprotector/bin/shutdownESXi.pl –Server HOST_ESXi –username USER –password XXXXX
For more info on how to use Intelligent Power Protector, the official guide. Once this is configured, we must configure a shutdown order at the vSphere level & Orderly power-up of our virtual machines.