7
How to install and manage PowerShield 3 on VMware 6.x This section describes the installation and configuration of the Software on VMware ESXi 6.x Server. Notice: The version of VMware ESXi 6.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 6.x Prerequisities VMware ESXi 6.0.0 build 3073146 vSphere client version 6.0.0 build 3016447 vSphere Management Assistant 6 (vMA) downloaded from http://www.riello-ups.com/downloads/1- powershield (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 6 (vMA) in the past and you need only to upgrade shutdown files, then you can download only Shutdown scripts (ghettoHostShutdown.pl and ups_shut.scr) for WMware ESXi 6 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 vi-admin user does not have root privileges, all commands have to be preceded with the "sudo" command 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 Once started the vMA 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.

Install the vSphere Management Assistant (vMA) application€¦ · search on the "Support" area). If you have already downloaded vSphere Management Assistant 6 (vMA) in the past and

  • Upload
    others

  • View
    38

  • Download
    2

Embed Size (px)

Citation preview

How to install and manage PowerShield3 on VMware 6.x This section describes the installation and configuration of the Software on VMware ESXi 6.x Server. Notice: The version of VMware ESXi 6.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 6.x

Prerequisities VMware ESXi 6.0.0 build 3073146

vSphere client version 6.0.0 build 3016447

vSphere Management Assistant 6 (vMA) downloaded from http://www.riello-ups.com/downloads/1-powershield (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 6 (vMA) in the past and you need only to upgrade shutdown files, then you can download only Shutdown scripts (ghettoHostShutdown.pl and ups_shut.scr) for WMware ESXi 6 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

vi-admin user does not have root privileges, all commands have to be preceded with the "sudo" command

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

Once started the vMA 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.

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 First of all you need to log in to the vMA. User is vi-admin. The password is written on the tab “summary” of the vMA on the bottom left “annotation” where there are the box of the description of the vMA

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 <hostesxi6_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: esx6i.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="esx6i.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 <hostesxi6_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:

ghettoHostShutdown.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 PowerShield3 user manual to do this)

ghettoHostShutdown.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 $EMAIL_HOST = 'hostmail.domain'; <- your mail host my $EMAIL_DOMAIN = 'company.com'; <- your domain my $EMAIL_TO = 'Receiver <[email protected]>'; <- receiver mail my $EMAIL_FROM = 'Sender <[email protected]>'; <- 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 ESXi6 (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.