Recently I got 3 HP servers for my home lab (one ProLiant G5 and 2 x ProLiant G7). While I was configuring them, updating firmware, installing OS, etc…I was spending too much time logged in iLO, just for simple operations, powering up and powering down the servers. In addition, to save on my electric bill, I was shutting down the servers each night.

HP iLO can be accessed using SSH and once logged in with the same credentials that you use for the GUI, you can power on and off the server(s) with simple commands. Yes, the commands are “power on” and “power off”.
To be able to change the power state of the servers, we’ll use plink. plink allows you to SSH to the server and send a command, the one that you usually type in.

So, it’s really simple, just create a batch file and add one or more of these commands for multiple servers.

plink -pw ilo_pwd "ilo_username@ilo_ip_or_hostname" "power on"

or

plink -pw ilo_pwd "ilo_username@ilo_ip_or_hostname" "power off"

where ilo_pwd and ilo_username are the credentials that you use to log to iLO GUI and ilo_ip_or_hostname is the … yes, the IP or the hostname of the iLO.

Now, I can power on/off my servers with one double-click and I can also schedule the batch file to shut down the servers at some time, in case I forgot to do that. If you want to schedule the batch file, make sure that you run the plink command manually first, so you can accept the key, otherwise your scheduled task will be stack on this message.

za-blog

NOTE: The power off command will do hard power off, so the OS running won’t be aware of that. Make sure the OSes are properly shut down to avoid any corruption.


More Posts


CentOS 7: Install RoundCube Web Mail Client
June 3, 2015

CentOS 7: Install RoundCube Web Mail Client

CentOS 7: Install LAMP (Linux, Apache, MySQL, PHP) + WordPress
May 31, 2015

CentOS 7: Install LAMP (Linux, Apache, MySQL, PHP) + WordPress

PowerShell, plink & HP c7000 chassis
March 17, 2015

PowerShell, plink & HP c7000 chassis

Amazon AWS Command Line Interface
March 10, 2015

Amazon AWS Command Line Interface