ESXi

 View Only
  • 1.  UPS Eaton And Esxi Download Step By Step

    Posted Jun 15, 2011 08:13 AM

    Eaton UPS: Download of VMware  ESXi & Guests and Hosts Step By Step

    NOTE:  The Esxi should be unlocked

    On VMware ESXI we need to install pre-defined Virtual machine

    Because ESXI does not have Administrative console for hypervisor

    A pre-defined Virtual machine called:   vSphere Management Assistant (vMA)

    Need to be downloaded from the Vmware Site, to The local drive of yours

    For Example   ->    D:\ Vmware_VIMA_Vma

    Download the vSphere Management Assistant 4.0.0   , see  link below

    http://www.vmware.com/support/developer/vima/

    How to import it

    Open the Vsphere, Click on File then -> Deploy OVF Template

    Browse to the folder on your local disk where was downloaded, should be the OVF file

    When finish will show on the inventory a guest machine -> vSphere Management Assistant

    Power it on, and follow the instructions,   vi-admin is a given user, then it asks a password

    Then give IP into your LAN, can with DHCP or without Dhcp

    For Root:   sudo –s then give the password for vi-admin

    For installing Eaton Ups into vMA

    Go to this link:    http://powerquality.eaton.com/pp/registration_app.asp

    Click on Download Software & Drivers

    Click on Intelligent Power Protector   (The upper one)

    Pick   <Your_UPS_Model> and VMware ESX    check on I agree terms and conditions -> Save and continue

    Now on the Upper left of the screen will see the Language and the OS to choose

    Pick   English for language and VMware for OS

    Will see the first one:   Intelligent Power Protector V.1.10rpm Software installer

    X86_64 for Vmware pay version of ESXI 4.0  & 4.10 (Vsphere4 & 4.10)

    Click on it, and then I agree then will download the file:

      Ipp-linux-1.10.045-1.x86_64.rpm

    Upload the package with Winscp software to the vMA guest machine, once is there

    Putty to the vMa client    logon with vi-admin

    sudo –s    to change to root   (same password as vi-admin)

    Before installing the rpm check if Firewall ports are opened, if not see below, between lines

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    DON’T FORGET TO OPEN THE FIREWALL PORTS RELEVANT

    Network architecture

    All hardware elements must have an operational network configuration that allows them to dialog freely

    with each other.

    Make sure in particular that vMA firewall authorises:

    _ connections on tcp port 4679 and 4680 to enable a remote access for supervision and

    configuration through Web Browser. These ports are reserved at IANA (http://www.iana.org).

    _ Connections through TCP port 80. It must be opened as a destination port (for output) on the

    machine hosting Intelligent Power Protector.

    To enable communication between Intelligent Power Protector and Network Management Card:

    sudo iptables -I OUTPUT -p tcp --dport 80 -j ACCEPT

    sudo iptables -I OUTPUT -p tcp --dport 5000 -j ACCEPT

    sudo iptables -I INPUT -p tcp --dport 4679 -j ACCEPT

    sudo iptables -I INPUT -p tcp --dport 4680 -j ACCEPT

    sudo iptables -I INPUT -p udp --dport 4679 -j ACCEPT

    sudo iptables -I INPUT -p udp --dport 4680 -j ACCEPT

    To enable communication between Intelligent Power Protector and Connect UPS

    BD/XSlot/PXGX2000.

    Nota: in this command we propose the –I (insert) option but –A (append) is possible to use as well.

    It isn’t not exactly the same. Please refer to firewall documentation for the best command for you.

    sudo iptables -I INPUT -p udp --dport 161 -j ACCEPT

    sudo iptables -I INPUT -p udp --dport 200 -j ACCEPT

    sudo iptables -I INPUT -p udp --dport 2844 -j ACCEPT

    sudo iptables -I INPUT -p udp --dport 2845 -j ACCEPT

    sudo iptables -I OUTPUT -p udp --dport 161 -j ACCEPT

    sudo iptables -I OUTPUT -p udp --dport 200 -j ACCEPT

    sudo iptables -I OUTPUT -p udp --dport 2844 -j ACCEPT

    sudo iptables -I OUTPUT -p udp --dport 2845 -j ACCEPT

    Then save the changes by command:

    service iptables save ->  Don’t forget this command to save

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Install  rpm

    rpm –i  ipp-linux-1.10.045-1.x86_64.rpm    ->   Accept all the defaults requests

    At the end, connect to Intelligent Power Protector using your web browser. by typing :

    http://<@IP-or-name-of-vMA>:4679/ (for a HTTP access)   

    https://<@ IP-or-name-of-vMA>:4680/ (For a HTTPS access

    Click Auto discover, (to discover the power source) if fails, do it manually by Address Scan, then write the IP

    Logon admin admin (the default password is admin) and click on Shutdown

    You should be able to see under configuration, a Power source defined

      Click on it  then EDIT   Shutdown configuration ,

    Shutdown type:  Script   

    Shutdown Script:   /ups/<Name_of_script>.sh        (I opened a folder called ups, )

    Define the script on vMA write:    vi <Name_of_script>.sh

    Where the Script  ->  <Name_of_script>.sh

    has inside the one row or more  depending of the number of ESXi hosts needed to download:

        ssh root@<IP_Of_ESXI_1>   ‘/sbin/shutdown.sh ‘ 

        ssh root@<IP_Of_ESXI_2>   ‘/sbin/shutdown.sh ‘ 

       ssh root@<IP_Of_ESXI_3>   ‘/sbin/shutdown.sh ‘ 

      where ESXI_1  is one ESXi host,     ESXI_2 is the second and ……. As needed

    that means will run on each ESXI the command -> ‘/sbin/shutdown.sh ‘  

    but the Script is located on vMA guest machine under folder /ups/  in this case


    The shutdown will download the ESXI host and guests VM’s see the Pdf document to define download and startup order of VM’s guests on ESXI host  (Also has the full documentation)

    http://download.mgeops.com/install/linux/ipp/IPP_how_to_vmware_esxi_en_2.pdf

    For avoiding asking password when the script runs, will define keys as the following: see between lines

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Generate Private & Public Keys to Logon on the ESXI from the vMA without Password

    Create your sshkey (puttykeygen or ssh-keygen) on the client,  on the vMa machine

    Logon as root, and under root folder write:  ssh-keygen

    Will create a     /root/.ssh     folder with two keys   id_rsa     and      is_rsa.pub

    Create “.ssh” directory on the root of ESXi device                                                                          Repeat this for Every ESXi

    Place the keyfile (id_rsa.pub) from the client to the host (Each ESXi) , into the   .ssh  folder created

    Goto the ESXi host .ssh folder run this command        cat id_rsa.pub >> /.ssh/authorized_keys      Repeat this for Every ESXi

    chmod 0600 -R /.ssh     on the ESXi                                                                                        Repeat this for Every ESXi

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    important NOTE: Every folder (like /.ssh) and all folders added manually will be removed Automatically

    by the Esxi,  each time the Esxi reboots

    To overcome this read the following:

    At booting time, the script /etc/rc.local is executed. Furthermore it’s possible to modify this script and it still survives the reboot.

    1) Copy the /.shh   folder   to /vmfs/volumes/datastore1/

      see command    cp  –r  /.shh/  /vmfs/volumes/datastore1/ 

    2) edit /etc/rc.local   (suggest to backup it first to e.g. rc.local.gib)

    Edit and add a row inside  the file the   /etc/rc.local  file   and write this command   ->    cp -r /vmfs/volumes/datastore1/.ssh/ /.ssh  

    and save the  rc.local

    Will restore the /.ssh folder every reboot

    Now you can do a test from the Ups,  the Gests and the Hosts will be downloaded  but not poweroff

    If you want to poweroff each Esxi,  Vi /sbin/shutdown.sh  (suggest to backup it first e.g. download.sh.gib)

    and append the last row the word: poweroff   then   save



  • 2.  RE: UPS Eaton And Esxi Download Step By Step

    Posted Jun 15, 2011 08:35 AM

    very useful guide, i would advise adding it as a document ..



  • 3.  RE: UPS Eaton And Esxi Download Step By Step

    Posted Jun 15, 2011 09:09 AM

    Thanks, I spent lots of time gathering all the info together, now can save time to others



  • 4.  RE: UPS Eaton And Esxi Download Step By Step

    Posted Feb 11, 2013 12:44 PM

    Great guide!

    However the command to save iptables seems to no longer work in vMA 5.1.

    Do you have an updated command?



  • 5.  RE: UPS Eaton And Esxi Download Step By Step

    Posted Aug 06, 2013 12:00 PM

    There is a command that is just 'iptables-save' run as sudo, 'sudo iptables-save'.