Hp lights out xml scripting sample for windows

HP iLO2 - Удалённое управление настройками с помощью hponcfg и PowerShell на примере установки сертификата HP SIM

После смены сертификата HP Systems Insight Manager (SIM) появилась необходимость заменить сведения о доверенном узле SIM в настройках интерфейса iLO2 на всех серверах HP ProLiant для того, чтобы, как и ранее, работала процедура прозрачного перехода от веб-узла SIM к веб-странице iLO2 — Single sign-on (SSO). Учитывая то, что контроллеров iLO2, требующих одинаковой настройки определённого параметра оказалось не так уж и мало, — возник вопрос об автоматизации этой задачи.

Выяснилось, что в составе утилиты HP Lights-Out Online Configuration Utility (по умолчанию устанавливается в C:Program FilesHPhponcfg) имеется CLI-утилита hponcfg.exe, которая позволяет обратиться к локальному контроллеру iLO2 и с помощью специально сформированного конфигурационного файла в формате XML выполнить изменение любых параметров контроллера. Встроенное описание ключей утилиты довольно скудное и поэтому для получения информации о ней можно воспользоваться руководством HP Integrated Lights-Out 2 Management Processor Scripting and Command Line Resource Guide.

Пример команды, с помощью которой можно получить текущую конфигурацию iLO2 в XML:

cd "C:Program FilesHPhponcfg"
hponcfg.exe /w "C:TempiLO2-Output.xml"

В нашем случае в настройках контроллера сначала нужно удалить информацию о старом сертификате SIM а затем импортировать новый сертификат. Соответственно будем выполнять эту задачу в два этапа. То есть для удаления и установки сертификата используем отдельные конфигурационные файлы, которые передадим в последующем утилите hponcfg.exe.

Содержимое файла iLO2-DeleteHPSIMTrust.xml:

<RIBCL VERSION="2.1">
<LOGIN USER_LOGIN="Administrator" PASSWORD="blabla">
<SSO_INFO MODE="write">
<DELETE_SERVER INDEX="0" />
</SSO_INFO>
</LOGIN>
</RIBCL>

Выполняем удаление старого сертификата SIM с помощью вышеуказанного конфигурационного файла:

hponcfg.exe /f "C:TempiLO2-DeleteHPSIMTrust.xml"

image

Содержимое файла iLO2-AddHPSIMTrust.xml

<RIBCL version = "2.1">
<LOGIN USER_LOGIN="Administrator" PASSWORD="blabla">
<SSO_INFO MODE="write">
<MOD_SSO_SETTINGS>
<TRUST_MODE VALUE="CERTIFICATE" />
</MOD_SSO_SETTINGS> 
<SSO_SERVER IMPORT_FROM="HPSIM.holding.com" />
</SSO_INFO>
</LOGIN>
</RIBCL>

В этом конфигурационном файле мы используем функцию импорта сертификата непосредственно с сервера SIM. Обратите внимание на то, что в обоих конфигурационных файлах в теге LOGIN мы используем вымышленные учетные данные, главное в нашем случае —  это наличие прав локального администратора на сервере где мы запускаем утилиту hponcfg.exe 

Выполняем импорт нового сертификата SIM с помощью вышеуказанного конфигурационного файла:

hponcfg.exe /f "C:TempiLO2-AddHPSIMTrust.xml"

image

Если в вашей инфраструктуре используется некоторое количество серверов с Linux или ESX, то автоматизировать процесс передачи настроек iLO2 можно будет например с помощью подключения к той-же утилите hponcfg через Telnet или SSH, например так как это описано в заметке Damian Karlson — Modifying HP c-Class Blades via iLO and PowerShell

В моём случае все сервера, на которых нужно автоматизировать процесс передачи настроек iLO2, работают под управлением ОС Windows Server 2008 R2 и поэтому я воспользуюсь PowerShell.

Приведу пример PS-скрипта, который копирует на удалённые сервера нужные конфигурационные файлы xml, применяет их с помощью удалённого вызова утилиты hponcfg.exe и затем удаляет эти файлы. Список серверов считывается из текстового файла iLO2-Servers.txt с содержимым:

server1.holding.com
server2.holding.com
server3.holding.com

Содержимое скрипта iLO2-SetupHPSIMTrust.ps1:

$ScriptPath = "C:ToolsScripts"
$ServersListPath = "$ScriptPathiLO2-Servers.txt"
$SIMDelTrustFile = "iLO2-DeleteHPSIMTrust.xml"
$SIMAddTrustFile = "iLO2-AddHPSIMTrust.xml"
$SIMDelTrustPath = $ScriptPath + "" + $SIMDelTrustFile
$SIMAddTrustPath = $ScriptPath + "" + $SIMAddTrustFile
$ToolPath = '"C:Program FilesHPhponcfghponcfg.exe"'
$SIMDelTrustCMD = "& $ToolPath /f C:iLO2-DeleteHPSIMTrust.xml"
$SIMAddTrustCMD = "& $ToolPath /f C:iLO2-AddHPSIMTrust.xml"

Get-Content $ServersListPath | ForEach-Object {
Write-Host "`nRun commands on server " $_ "`n"  -foregroundcolor DarkGreen
$RemoteVolume = "\" + $_ + "C$"
Copy-Item -Path $SIMDelTrustPath -Destination $RemoteVolume
Write-Host "Run: " $SIMDelTrustCMD "`n"  -foregroundcolor DarkRed
Invoke-Command -computername $_ -ArgumentList $SIMDelTrustCMD -ScriptBlock { param ($DCmd) Invoke-Expression $DCmd }
Write-Host "`n"
$RemoteFile1 = $RemoteVolume + "" + $SIMDelTrustFile
Remove-Item -Path $RemoteFile1
Copy-Item -Path $SIMAddTrustPath -Destination $RemoteVolume
Write-Host "Run: " $SIMAddTrustCMD "`n"  -foregroundcolor DarkRed
Invoke-Command -computername $_ -ArgumentList $SIMAddTrustCMD -ScriptBlock { param ($ACmd) Invoke-Expression $ACmd }
Write-Host "`n"
$RemoteFile2 = $RemoteVolume + "" + $SIMAddTrustFile
Remove-Item -Path $RemoteFile2
}

В рассматриваемом примере файлы iLO2-AddHPSIMTrust.xml, iLO2-DeleteHPSIMTrust.xml, iLO2-Servers.txt и iLO2-SetupHPSIMTrust.ps1 расположены в одном каталоге C:ToolsScripts

При необходимости вы можете переработать приведённый пример под свои задачи, например массовое изменение сетевых настроек или управление локальными учетными записями iLO2. Для того чтобы подсмотреть примеры xml файлов, решающих разнообразные задачи рекомендую скачать архив XML Scripting Sample по первой ссылке в конце заметки.

Дополнительные источники информации:

  • Business Support Center — HP Lights-Out XML Scripting Sample for Windows
  • HP Integrated Lights-Out 2 Management Processor Scripting and Command Line Resource Guide
  • ADdict Blog — HP C-Class blades: bulk iLO configuration
Skip to content

Installing HP Lights-Out Configuration Utility on Windows

Home/HP iLO/Installing HP Lights-Out Configuration Utility on Windows

Installing HP Lights-Out Configuration Utility on Windows

Would you like to learn how to Install the HP Lights-Out Configuration Utility on Windows? In this tutorial, we are going to show you how to download and install the HP Lights-Out Configuration Utility software on a computer running Windows.

HPQLOCFG is a command-line software that allows you to send XML configuration and control scripts over the network to an HP iLO interface.

Copyright © 2018-2021 by Techexpert.tips.
All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means without the prior written permission of the publisher.

Equipment list

Here you can find the list of equipment used to create this tutorial.

This link will also show the software list used to create this tutorial.

HP iLO Playlist:

On this page, we offer quick access to a list of videos related to HP iLO.

Don’t forget to subscribe to our youtube channel named FKIT.

HP iLO Related Tutorial:

On this page, we offer quick access to a list of tutorials related to HP iLO.

Tutorial — HP Lights-Out Configuration Utility on Windows

HP Lights-out configuration utility download

Start the HP Lights-Out Configuration Utility installation.

HP Lights-out configuration utility installation

Accept the license and click on the Next button.

HP Lights-out configuration utility license

Click on the next button.

HP Lights-out configuration utility installation path

Wait the installation to complete and click on the Close button.

HP Lights-out configuration utility

After finishing the HP Lights-out configuration utility installation, open a DOS prompt.

On the DOS prompt, access the HP Lights-out configuration utility installation folder.

You are now able to use the HPQLOCFG command to connect to an HP iLO interface and send RIBCL scripts.

In our example, the hpqlocfg command will send the RIBCL commands inside the Factory_Defaults.xml file to the HP iLo interface 192.168.0.10 using the username administrator and the password mypass.

Here is the content of the Factory_defaults.xml file.

Congratulations! You installed the HP Lights-out configuration utility on Windows

VirtualCoin CISSP, PMP, CCNP, MCSE, LPIC22021-08-07T13:10:21-03:00

Related Posts

Page load link

Join Our Newsletter 

Stay updated with the latest tutorials

close-link

This website uses cookies and third party services.

Ok


Posted: April 13, 2012 in HP
Tags: hp, ilo web, technology

It is possible to reset the Administrator password (or even add another user with specific privileges) using Remote Insight Board Command Language (RIBCL). Apparently, to use RIBCL through your OS, you need to have login rights to the server (presumably enough rights to install HP system tools).  Following steps are to be performed:

1. Install SNMP (prerequisite for HP Insight Management Agents)

2. Download and Install HP Insight Management Agents

http://h18013.www1.hp.com/products/servers/management/im-agents/downloads.html

3. Download and Install HP Lights-Out Online Configuration Utility

http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareIndex.jsp?lang=en&cc=us&prodNameId=1135772&prodTypeId=15351&prodSeriesId=1146658&swLang=8&taskId=135&swEnvOID=1005

Note 1: If these Agents and Configuration Utility are already installed, upgrade them

Note 2: If you encounter NTVDM error while installing HP Lights-Out Online Configuration Utility, just use a common compression tool like WinZip or WinRAR to extract the contents to C:Program FilesHP or C:HPiLO.

4. Download HP Lights-Out XML Scripting Sample for Windows. Extract its contents to a folder.

Choose the following two XML files and copy them to the folder where you extracted the HP Lights-Out Online Configuration Utility.

- Administrator_reset_pw.xml or Change_Password.xml 
- Add_User.xml

Note 3: If you extracted HP Lights-Out Online Configuration Utility to C:Program FilesHP or C:HPiLO, then there will be a folder named “HPONCFG” which will contain the required utility “hponcfg.exe”

Note 4: Make sure that you copy the above mentioned files within the folder called “HPONCFG”

5. Using notepad (any text editor), open up the Administrator_reset_pw.xml sample file and modified it slightly as per your requirement. The initial LOGIN USER_LOGIN is required for syntax reasons but it is not actually processed. I gave the Administrator a “bogus” password.

Similarly, you can use Change_Password.xml sample to reset Administrator (or even other passwords)

Below shown is the screenshot that shows the modified sample file I made for resetting “Administrator” password.

6. If changing Administrator’s password seems risky, you can also add another user with administrator privileges. You can then login as that user and change the Administrator password via the web console. Below shown is the screenshot that shows the modified sample file to add a user.

7. Finally open command prompt and change directory path to C:Program FilesHPhponcfg or C:hpilohponcfg and type the following:

Понравилась статья? Поделить с друзьями:
  • Hp lights out standalone remote console for windows
  • Hp laserjet универсальный драйвер windows 10 x64 для windows
  • Hp laserjet универсальный драйвер windows 10 x64 pcl5
  • Hp laserjet usb dot4 communication driver for windows 8 and higher
  • Hp laserjet pro m1132 драйвер для windows 10