Connecting to HP ILO2s from ConsoleWorks on the OpenVMS platform

From TDiWiki

Jump to: navigation, search

OpenVMS - Connecting to Integrity / SuperDome iLO2's via Telnet

ConsoleWorks can connect to Integrity and Superdome iLO2's via Telnet. While making these connections, it is also possible to connect to a particular partition or the management port itself. While there may be other ways to do this, the example below has proven successfull in several of TDI's customer accounts. For our example the process will consist of creating a ConosleWorks Console and using custom a created scan, event and Automatic Action command procedure.


The steps involved for making this type of connection are as follows:

- Create a Scan in the ConsoleWorks interface. Name it something like Integrity_Ilo

Press Add Scan

Image:Ilo2_Create_Scan.JPG

- Create an Event definition. Name it Integrity_Ilo_Login

The Pattern: should be MP login: (Be sure it is exactly as it appears on your iLO2. VERIFY this)
Press Add Event

Image:Ilo2_Create_Event.JPG

Associate the Event to the Integrity_Ilo Scan
Press Update Event

Image:Ilo2_Associate_Event.JPG

- Create a ConsoleWorks Console using the Telnet connector and the appropriate IP address or Host name of the Ilo2

Press Add Console

Image:Ilo2_Create_Console.JPG

Go to Manage Consoles and associate this new console to the Integrity_Ilo Scan
Press Update Scan
Leave the screen here

If you haven't already, copy the example command proc below to the CONWRKS_ROOT:[<YOUR_INVOCATION_NAME>.ACTIONS.EVENT] directory on the ConsoleWorks host server

- Press View Events and click on Integrity_Ilo_Login

- Click Automatic Actions

Select the new Console INTEGRITY_ILO
Select the Command Proc INTEGRITY_LOGIN.COM
Enter the Username in the "Contact" field
Enter the Password in the "Parameter" field
Be sure Enable Event Action Throttling is NOT enabled
Press Update Actions

Image:Ilo2_Auto_Action.jpg

- Click on >Operations Consoles

Click on the new console INTEGRITY_ILO
Disable the console
Enable the console
Click the "Connect" link

You should now be connected to the OS of the ILO. Since each ILO2 seems to have somewhat different characteristics things like timing within the command proc may need to adjusted up or down via the wait statments.

Addtitional commands may be required to to move to the different partions or the management port itself based on the initial login menu. You may accomplish this by simply modifying the command proc used in the above example.

If you have other Ilo2's you can also modify the command proc to handle the other ILO's and using the Contact or Parameter fields or by simply reproducing this command proc for each Ilo2 in your environment.

If you're having problems getting connected, see the Wiki topic Debugging Event Actions on OpenVMS . It will advise you on how to use the SYS$BATCH queue to "see" what's happening when the INTEGRITY_LOGIN.COM command proc executes.

Example of Command procedure for Ilo2 Telnet Login

$!*****************************************************************************
$!* Copyright © TECSYS Development, Inc., 1999-2008
$!* All Rights Reserved.
$!*
$!* This software is furnished under a license and may be used and copied
$!* only in accordance with the terms of such license and with the inclusion
$!* of the above copyright notice. This software or any other copies thereof
$!* may not be provided or otherwise made available to any other person. No
$!* title to and ownership of the software is hereby transferred.
$!*
$!* The information in this software is subject to change without notice and
$!* should not be construed as a commitment by TECSYS Development.
$!*
$!* Usage:
$!*
$!* @AUTO_LOGIN [Console] [Event] [Context File] [Contact] [Parameter] -
$!* [Invocation]
$!*
$!* Parameters:
$!*
$!* P1: Console Name
$!* P2: Event Name
$!* P3: Sequence Number
$!* P4: Context File
$!* P5: Contact
$!* P6: Parameter
$!* P7: Invocation
$!*
$!*****************************************************************************
$ @CONWRKS_ROOT:[000000]CONWRKS_LOGICALS.COM 'P7' "F:$TRNLNM(""CONWRKS_ROOT"",""LNM:$SYSTEM_TABLE"")'" PROCESS
$ open/read ctx_file 'p4'
$! Loop reading tagged lines until eof
$read_loop:
$ read/end_of_file=theend ctx_file ctx_line
$ if "f:$extract(0,7,ctx_line)'" .eqs. "SERVER:"
$ then
$ server_name = f:$extract(8,f:$length(ctx_line),ctx_line)
$ endif
$ if "f:$extract(0,5,ctx_line)'" .eqs. "PORT:"
$ then
$ port_number = f:$extract(6,f:$length(ctx_line),ctx_line)
$ endif
$ if "f:$extract(0,8,ctx_line)'" .eqs. "CONSOLE:"
$ then
$ console = f:$extract(9,f:$length(ctx_line),ctx_line)
$ endif
$ if "f:$extract(0,5,ctx_line)'" .eqs. "NAME:"
$ then
$ name = f:$extract(6,f:$length(ctx_line),ctx_line)
$ endif
$ if "f:$extract(0,9,ctx_line)'" .eqs. "SEQUENCE:"
$ then
$ sequence = f:$extract(10,f:$length(ctx_line),ctx_line)
$ endif
$ if "f:$extract(0,14,ctx_line)'" .eqs. "AUTHORIZATION:"
$ then
$ authorization = f:$extract(15,f:$length(ctx_line),ctx_line)
$ endif
$ goto read_loop
$theend:
$ close ctx_file
$!
$! Now here's where we actively attempt to login to the iLO card
$!
$ cons/ser='server_name'/port='port_number'/auth="authorization'" write/console='p1' "p5'^m" ! Contact from auto action screen is actually the username to the iLO card
$!
$ wait 00:00:02 ! Wait a couple of seconds for the iLO card to respond with a Password prompt
$!
$ cons/ser='server_name'/port='port_number'/auth="authorization'" write/console='p1' "p6'^m" ! Parameter from auto action screen is actually the password to the iLO card
$!
$ wait 00:00:04 ! Wait until the iLO main menu shows up.
$!
$ cons/ser='server_name'/port='port_number'/auth="authorization'" write/console='p1' "CO^m" ! Here we're accessing the console of the actual OS.
$ wait 00:00:01
$ cons/ser='server_name'/port='port_number'/auth="authorization'" write/console='p1' "0^m" ! Here we're accessing the console of the actual OS.
$!
$! We're now fully logged into the actual OS console, so delete the context file and exit.
$!
$ delete 'f:$parse(p4, ";*")' /log
$ exit

Note: If "SSL Required" is selected on the >Admin >Configure ConsoleWorks server page, then each of the lines above used for connecting will need to have the ssl qualifier added:

$ cons/ssl/ser='server_name'/port='port_number'/auth="authorization'" write/console='p1' "p5'^m" !
Personal tools