Guide To Install PowerShield3 On ESX

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Guide: how to setup Riello UPS PowerShield3 in VMware ESX 3.x and 4.

Who often need to setup ESX servers together with Riello UPS devices this guide describes how to
do that.

Assumed:
you have an ESX 3.x or 4 server running.
You have an UPS Riello UPS with a management card NetMan 10x plus that is configured or that it
is connected to the physical Server serial port.
The IP address of the ESX server is registered to allow it to communicate with the management
card.
You know the login, password of the UPS management card Netman 10x plus.

This is a 3 step process

1. Configure the VMware ESX 3.x or 4 firewall


2. Install the Riello UPS PowerShield3 Shutdown agent
3. Configure the PowerShield3 Shutdown agent

Step 1 - Configure the VMware ESX 3.x, 4 firewall

Logon to your service console with your favorite ssh client (putty)

open up the firewall with the following commands

esxcfg-firewall -o 33000,udp,out,"UpsAgent udp Port 33000"


esxcfg-firewall -o 33000,udp,in,"UpsAgent udp Port 33000"
esxcfg-firewall -o 33002,udp,out,"UpsAgent udp Port 33002"
esxcfg-firewall -o 33002,udp,in,"UpsAgent udp Port 33002"

Move to the next step.

Step 2 - Install the Riello UPS PowerShield3 Network Shutdown agent

Download the “PowerShield³ v.5.0 (Build: 007) for VMWare ESX” from the Riello UPS website
called upsmon‐5.0.7‐linux‐2.6‐x86_64.rpm copy the file to the ESX service console and run the
following command

rpm -ihv upsmon-5.0.7-linux-2.6-x86_64.rpm

Step 3 - Configure the Riello UPS PowerShield3 Network Shutdown agent


Run the configuration programm:

/opt/upsmon/upsetup

Now configure the agent follow the instructions on the User’s manual.

In the event log link you can check if the esx server is communicating with the UPS. It should show
a message that it established a connection.

Other commands
/etc/rc.d/init.d/upsmon stop
/etc/rc.d/init.d/upsmon start

To uninstall, type:

rpm -e upsmon

For the guest operating systems follow the instructions on the user’s manual in the specific session.

MOST IMPORTANT SETTINGS OF ALL!!!


On the guest operating system don’t enable the UPS Shutdown because you will turn off the UPS
BEFORE shutdown the ESX operating system. The UPS shutdown must be specified ONLY on the
ESX server.
Complementary information

VMware ESX server 3.5 and 4.0 Configuration

In case of power events or UPS alerts, and if it reaches the PowerShield3 shutdown point, PowerShield3 starts
executing the ups_shut.scr script file. The script file executes in the following manner, and the code is given
below.
1. It will check number of guest operating system running on that server.
2. It will then start guest operating system down one by one, with two seconds between each guest operating
system shutdown.
3. After all guest operating systems are down, it will start shutdown of the VMware server.
It is necessary to configure the PowerShield3 client to be configured properly so that it wills shutdown all
guest operating systems and servers properly. You can modify the ups_shut.scr file to configure shutdown
behaviour according to your need.
To shutdown virtual machines in the order detailed in VIC, you have to edit and customize ups_shut.scr and
the “stopVMware” function:

# Customisable VMware ESX shutdown


stopVMware()
{
# Test if we have a VMware ESX v3 setup
if [ -x /usr/bin/vmware ]
then
ESXV3=`/usr/bin/vmware -v | grep "ESX Server 4"`
if [ -n "$ESXV3" ]
then
# Get the VM list
VMLIST=`/usr/bin/vmware-cmd -l`
for VM in $VMLIST
do
# Get the VM state
VMSTATE=`/usr/bin/vmware-cmd "$VM" getstate -q`

# Guest OS shutdown if VMSTATE is equal to "on"


if [ "$VMSTATE" == "on" ]
then
/usr/bin/vmware-cmd $VM stop trysoft
# delay a bit the next sequence
sleep 2
fi
done
# Delay for 1 minute to give the VMs more time
# to cleanly shutdown
sleep 60
fi
fi
}

Riello UPS, PowerShield3 are trade names, trademarks, and/or service marks of RPS S.p.A or its subsidiaries and affiliates. All other
trademarks are property of their respective owners.

VMware is a registered trademark of VMware, Inc.

You might also like