How to install and manage PowerShield3 on VMware 5.x This section describes the installation and configuration of the Software on VMware ESXi 5.x Server. Notice: The version of VMware ESXi 5.x must be purchased, because free of charge version is without some function, software can’t be used on free of charge version of ESXi 5.x Prerequisities VMware ESXi 5.0.0 build 469512 vSphere client version 5.0.0 build 455964 vSphere Management Assistant 5 (vMA) downloaded from http://www.riello-ups.com/downloads/1powershield (pay attention that the link could change, if so you can use http://www.riello-ups.com and search on the "Support" area). If you have already downloaded vSphere Management Assistant 5 (vMA) in the past and you need only to upgrade shutdown files, then you can download only Shutdown scripts (ghettoHostShutdown5.pl and ups_shut.scr) for WMware ESXi 5 from the link previously mentioned Secure Copy Protocol (SCP) client like WinSCP to upload packages to the VMware ESXi server VMware tools installed on each guest OS Install the vSphere Management Assistant (vMA) application: 1. Unzip the vMA virtual application package 2. Start vCenter Server or vCenter Client 3. Select File > Deploy OVF Template. 4. Click Browse 5. Select the Open Virtualization Format (OVF) and click next Setting the virtual machine startup and shutdown In the top of the tab "Configuration" of the "Virtual Machine Startup/Shutdown" you MUST enable the field "Start and Stop Virtual Machines with the system" and also the "Default Startup Delay" and the "Default Shutdown Delay". Also the settings of the above part of the grey windows snapshot have to be set as this; you can change the delays if you need it. However the startup of the guest can be disabled. Setting the vMA Once you are logged in on your vMA as user vi-admin with password Rps$2012. You may have the message: NO NETWORKING DETECTED. Please configure your network. In this case you have to delete /etc/udev/rules.d/70-persistent-net.rules and reboot. Your eth0 will be back and will need to be set properly. NOTE: All hardware elements must have an operational network configuration that allows them to communicate freely with each other. The Software uses UDP to communicate with UPS. Now you have to set the vMA in this way: Enter the following command to add Target Servers (HOST) to vMA (GUEST) (*): vifp addserver <hostesxi5_servername or ip address> Example command: vifp addserver 10.1.10.121 (in this examble 10.1.10.121 is the HOST) (*) If you got more than one host, the host where vMA is installed has to be added as LAST. And in ups_shut.scr you must write the ip address or hostname (depends on output from “vifp listservers”) of the host where vMA is installed (see below paragraph). Example: We have 5 hosts and vMA is installed on 10.1.10.121: 10.1.10.120 10.1.10.121 10.1.10.122 10.1.10.123 10.1.10.124 So the command addserver will be: vifp addserver 10.1.10.120 vifp addserver 10.1.10.122 vifp addserver 10.1.10.123 vifp addserver 10.1.10.124 vifp addserver 10.1.10.121 And in ups_shut.scr: ups_host="10.1.10.121" Verify that the target server has been added. Enter the following command to display target servers: vifp listservers Example response: 10.1.10.121 ESXi (**) (**) If the output of the command vifp listservers is the hostname and not the host ipaddress it means that you got the DNS enabled and working. Example response: esx5i.network.local ESXi In this case in ups_shut.scr you must write the hostname of the host where vMA is installed (see below paragraph). In this example ups_shut.scr will be: ups_host="esx5i.network.local" If you got more than one host, it's valid the same speech as above. The host where vMA is installed has to be added as LAST. If vifp listservers command output is the HOST NAME, you need to add all the HOSTS in /etc/hosts file, all the HOST you have added with addserver command. You need to add in /etc/host also the hostname of the vMA who is a GUEST. See paragraph " vMA network configuration to get mail log " where hosts file is described. If you want to remove a Server from the list use this command: vifp removeserver <hostesxi5_servername or ip address> Example command: vifp removeserver 10.1.10.121 Once you have added the host, then you can proceed to set the files you need to do the shutdown: ghettoHostShutdown5.pl (it's in /home/vi-admin) ups_shut.scr (it's in /opt/upsmon) And also you have to run upsetup (it's in opt/upsmon) to set it in order to communicate with the UPS (check 3 PowerShield user manual to do this) ghettoHostShutdown5.pl It's a pearl script, the file has to be modified in some parts, in order to let it works, and the parts are: This are settings to receive SMTP mail with the log of the vMA operations. my my my my $EMAIL_HOST = 'hostmail.domain'; <- your mail host $EMAIL_DOMAIN = 'company.com'; <- your domain $EMAIL_TO = 'Receiver <receiver@company.com>'; <- receiver mail $EMAIL_FROM = 'Sender <sender@company.com>'; <- sender mail On your mail server must be configured a rule that allows the vMA to send mail via SMTP (port 25) ups_shut.scr It's an scr file, the file has to be modified in a part, in order to let it works, and the parts are: ups_host="10.1.10.121" here you have to write the IP address or hostname of your vMA HOST ESXi5 (depends on output from “vifp listservers”) vma_name="vMA demo" here you have to write the vSphere name of your vMA where the script and the ghetto are and run sendmail="no" write "yes" to enable the mail, be sure that the mail setting on ghetto are ok. All the other parameters can be left standard or can be modified as per your use. For example, the parameter: host_operation="shutdown" have 4 possible setting: shutdown standby autoquery dryrun -> if you want to make a shutdown simulation, you have to set this parameter. THE SHUTDOWN WILL BE ONLY SIMULATE. PAY ATTENTION THAT NO OTHER UPSAGENT IS RUNNING ON THE GUEST YOU HAVE, ANOTHER AGENT COULD SHUTDOWN THE GUEST. If you set dryrun the parameter vm_operation="shutdown" will be not executed, in fact the vm will stay on without being shutting down. MOST IMPORTANT SETTINGS OF ALL!!! On the guest operating systems don’t enable the UPS Shutdown because you will turn off the UPS BEFORE shutdown the ESXi operating system. The UPS shutdown must be specified ONLY on the vMA console. vMA network configuration to get mail log We have checked inside the guest vMA (in our case 10.1.202.202) that the host ip address is present in the file hosts. cat /etc/hosts 127.0.0.1 vMA.company.com vMA 10.1.202.202 vMA.company.com vMA ::1 vMA localhost ip6-localhost ip6-loopback We have checked inside the vMA that the file resolv.conf has inside the search and DNS settings. cat /etc/resolv.conf search company.com nameserver 10.1.5.10 nameserver 10.1.5.19 We have checked inside the vMA that the file has the field SENDMAIL_SMARTHOST (mail server) set. cat /etc/sysconfig/sendmail SENDMAIL_SMARTHOST="hostname.domain" And in this way we are able to get log mail.
© Copyright 2024