3 advanced topics, Overview, Querying the hpdiscovery file based on system name – HP ProLiant DL380 Server User Manual
Page 12
3 Advanced topics
Overview
The advanced topics addressed in this section cover some of the most common deployment tasks
that can be automated using the Toolkit.
IMPORTANT:
The script files and script segments in this section are provided only as examples.
You must modify the scripts for your environment. When creating or modifying your own scripts,
the pause command is a valuable tool to help you determine that each step of the script is
functioning as desired.
Customizing deployment scripts using HPDISCOVERY and IFHW
Use the HPDISCOVERY utility to determine which devices and capabilities are available in a
particular ProLiant server. HPDISCOVERY generates an XML-based output file that provides
information such as system ROM version, amount of RAM available, and the types of devices
present in the system. Then, use the HWQUERY and IFHW (IF Hardware utility) files to query the
output file, enabling you to add conditional tests to a script so it performs different operations
based on the outcome of the tests.
Querying the HPDISCOVERY file based on system name
In the following script, the IFHW utility searches the HPDISCOVERY data in the hpdiscovery.xml
file for the system name ProLiant BL20p. If the system name is found, the script calls the bl20p.cmd
file.
ifhw .\hpdiscovery.xml allboards.xml HWQ:SystemName eq "ProLiant BL20p"
if errorlevel 1 goto NEXT1
call .\BL20p.cmd
goto end
:NEXT1
ifhw .\hpdiscovery.xml allboards.xml HWQ:SystemName eq "ProLiant DL380 G4"
if errorlevel 1 goto NEXT2
call .\ DL380G4.cmd
goto end
Querying the HPDISCOVERY file to determine the presence of a particular card
Using IFHW to detect a particular PCI card or device can be valuable in determining which settings
to apply. For example, an array controller used as a boot controller might require a RAID 1 setting,
while an optional array controller used for a database (such as a Smart Array 5312 Controller)
might require a RAID 5 ADG setting. The following example demonstrates how to use IFHW to
detect a particular card or device:
REM *** Configure the array controllers by reading the configuration
REM *** information in the script file and stamping it onto the array
REM *** controllers of the target server
echo Configuring the Array Controllers...
ifhw .\hpdiscovery.xml allboards.xml PCI:"Smart Array 5i Controller"
if errorlevel 1 GOTO NEXT1
.\ACU\bin\hpacuscripting.exe -i .\ArraySettings\SA5iArray.ini
:NEXT1
ifhw .\hpdiscovery.xml allboards.xml PCI:"Smart Array 6i Controller"
if errorlevel 1 GOTO NEXT2
12
Advanced topics
- ProLiant BL465c Server Blade ProLiant BL2x220c G7 Server-Blade ProLiant DL120 G7 Server ProLiant SL250s Gen8 Server ProLiant BL680c G5 Server-Blade ProLiant DL320s Server ProLiant SL230s Gen8 Server ProLiant BL2x220c G6 Server-Blade ProLiant BL480c Server-Blade ProLiant DL385 Server ProLiant BL2x220c G5 Server-Blade Intelligent Provisioning ProLiant BL490c G6 Server-Blade ProLiant BL620c G7 Server-Blade ProLiant DL365 G5 Server ProLiant ML330 G6 Server ProLiant BL490c G7 Server-Blade ProLiant DL360p Gen8 Server ProLiant SL335s G7 Server ProLiant DL320 Server ProLiant BL495c G5 Server-Blade ProLiant BL460c Gen8 Server Blade ProLiant DL360 Server ProLiant BL280c G6 Server-Blade ProLiant ML350p Gen8 Server ProLiant DL585 Server ProLiant ML370 Server ProLiant DL380p Gen8 Server ProLiant SL390s G7 Server ProLiant BL460c Server-Blade ProLiant ML310 G5 Server ProLiant BL680c G7 Server-Blade ProLiant BL260c G5 Server-Blade ProLiant BL495c G6 Server-Blade ProLiant DL160 Gen8 Server ProLiant ML350 Server ProLiant DL370 G6 Server ProLiant BL685c Server-Blade ProLiant DL785 G6 Server ProLiant DL785 G5 Server