HP Scripting Toolkit Windows Edition User Guide Abstract The Scripting Toolkit is designed for IT experts with experience in scripting operating system installations and configuring HP ProLiant server hardware.
Notices © Copyright 2005, 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. Confidential computer software.
Contents 1 Introduction...............................................................................................6 Scripting Toolkit........................................................................................................................6 Microsoft Windows Preinstallation Environment.............................................................................6 Minimum requirements.............................................................................................................
Using IFHW...........................................................................................................................28 IFHW command-line syntax.................................................................................................28 IFHW command-line arguments...........................................................................................28 IFHW return codes.............................................................................................................
ParityGroups............................................................................................................46 PreferredPath...........................................................................................................46 RAID.......................................................................................................................46 Sectors....................................................................................................................46 Size..........
1 Introduction Scripting Toolkit The Scripting Toolkit is a server deployment product that delivers an unattended automated installation for high-volume server deployments. This document describes how to best use the Scripting Toolkit to configure HP ProLiant servers. It also contains information about the Toolkit utilities and how to use them in an unattended environment. This document does not include information about installing the operating system.
2 Deployment using the Scripting Toolkit Deployment overview The Scripting Toolkit includes a set of utilities for configuring and deploying servers in a customized, predictable, and unattended manner. These utilities enable you to duplicate the configuration of a source server on target servers with minimal user interaction. IMPORTANT: ProLiant 100-Series servers do not support all toolkit commands, and those that are supported might not work as expected.
Creating a network share To create a network share: 1. Download the appropriate Scripting Toolkit SoftPaq from the Toolkit website (http:// www.hp.com/go/ProLiantSTK). 2. Install the Toolkit SoftPaq on a common server that resides on the same network as the servers to be deployed. 3. Share the folder in which you installed the Toolkit. Be sure that the account you use has read and write access. 4. Create an empty directory called \DATA in the Toolkit folder for configuration files.
1. Apply the base image (Winpe.wim) by adding imagex to a local Windows PE directory. For example: imagex /apply WinPE.wim 1 c:\winpe_x86\mount\ or imagex /mountrw WinPE.wim 1 c:\winpe_x86\mount\ 2. Add the .inf file to the base image by using the peimg /inf command. For example: peimg /inf= c:\winpe_x86\mount\Windows 3. where is the location of the .inf file. Repeat steps 1 and 2 for each additional device driver.
2. Copy and then paste the STK IO driver to the windows\system32\drivers directory. NOTE: If the HPSTKIO.SYS driver is not installed, some utilities do not work correctly. copy c:\ssstk\hpDrivers\system\ hpsstkio\ hpsstkio.sys c:\SSSTK.TMP\ windows\system32\drivers For more information about Windows PE 3.0, see the Windows Preinstallation Environment User's Guide (WinPE.chm) located in the Windows Automated Installation Kit.
4. (Optional) Configure the Lights-Out option. HP recommends that you set these parameters: a. Edit the sample iLOconfig.xml file that is provided with the Toolkit so that it contains the appropriate password and other required information. For more information, see the "Using HPONCFG" section. b. Copy the edited iLOconfig.xml file to s:\data. c. Change to the directory where HPONCFG resides. d. Configure the iLO option: hponcfg -f s:\data\iLOconfig.xml 5. 6. Insert the operating system CD.
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.
.\ACU\bin\hpacuscripting.exe -i .\ArraySettings\SA6iArray.ini :NEXT2 \ifhw .\hpdiscovery.xml allboards.xml PCI:"Smart Array 5312" if errorlevel 1 GOTO NEXT3 .\ACU\bin\hpacuscripting.exe -i .\ArraySettings\SA5312Array.ini :NEXT3 Querying the HPDISCOVERY file to determine the presence of a card family IFHW and HWQUERY can perform queries based on partial name information, enabling you to verify the presence of a whole family of cards by using a partial query such as Smart Array. NEXT1: ifhw .\hpdiscovery.
1. Using a standard text editor, create or modify the following additional Toolkit files for the unattended installation: a. Edit the STARTDEPLOY.CMD file, which is executed by STARTNET.CMD in Windows PE, to modify the environment variables to match the locations of the utilities and data files specific to your deployment infrastructure. You must customize this file for your environment. In the following example, lines in bold type indicate information that must be modified for your environment.
goto end :NEXT2 %Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml HWQ:SystemName eq "ProLiant ML570" if errorlevel 1 goto NEXT3 call .\Typical.cmd goto end :NEXT3 %Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml HWQ:SystemName eq "ProLiant BL10e" if errorlevel 1 goto NEXT4 call .\Typical.
c. Edit the DEPLOYSERVER.CMD file for your specific environment. NOTE: The IFHW and HWQUERY utilities can be used to assist in customizing the DEPLOYSERVER.CMD script for your environment. For more information about these utilities, see “Toolkit utilities” (page 23). The DEPLOYSERVER.CMD file is similar to the following: rem @echo off cls echo [ SCRIPT FOR REMOTE INSTALL OF W2K3 ON TYPICAL SERVER ] REM pause echo Retrieving State Information...
:NEXT4 %Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml PCI:"Smart Array P600 Controller" if errorlevel 1 GOTO NEXT5 %Tools%\ACU\bin\hpacuscripting.exe -i %GlobalData%\ArraySettings\pl-r5.ini GOTO NEXT5 :NEXT5 REM pause REM=============================================================== REM *** Configure the iLO if iLo Present REM *** echo configuring iLO is present REM=============================================================== rem %Tools%\System\ifhw hpdiscovery.
%Tools%\System\reboot c: :State4 2. Using a standard text editor, modify the Windows Server 2003 SP1 UNATTEND.TXT sample file to fit your deployment requirements. A sample UNATTEND.TXT file is provided with the Toolkit. To add mass-storage drivers, you must modify the [MassStorageDrivers] and the [OEMBootFiles] sections. You can also use Microsoft Setup Manager to help you create a custom UNATTEND.TXT file.
CPQCISSM.SYS MegaIDE.sys Symmpi.sys LsiCsb6.sys HPCISSs2.sys AAC.sys TXTSETUP.OEM [GuiUnattended] AdminPassword=password AutoLogon=Yes AutoLogonCount=1 OEMSkipRegional=1 OemSkipWelcome=1 TimeZone=20 [UserData] ComputerName=TEST FullName=HP OrgName=HPQ ProductID=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx [Proxy] Proxy_Enable=0 Use_Same_Proxy=0 [LicenseFilePrintData] AutoMode=PerServer AutoUsers=999 [GuiRunOnce] "c:\ntcsp\setupex.
Accept_CommunityName=public Send_Authentication=yes [TerminalServices] ApplicationServer=0 PermissionsSetting=0 [Display] AutoConfirm=1 BitsPerPel=16 ConfigureAtLogon=0 VRefresh=60 Xresolution=800 Yresolution=600 [OEM_Ads] Logo=Compaq.bmp 3. If you modified the [MassStorageDrivers] section in the UNATTEND.TXT file, you must also edit the TEXTSETUP.OEM file. For more information, see the Microsoft website (http:// technet.microsoft.com/en-us/windowsserver/default.aspx).
REM This section performs the System ROM Flash. Online Flash components REM are kept in a directory called Roms REM ---Roms\cp004648.exe /INSTPATH:S:\ROMScratcharea REM ---REM Check the error code returned to determine Success or Failure REM ---if errorlevel 3 goto HWNOTFOUND if errorlevel 2 goto REBOOTREQUIRED if errorlevel 1 goto NEXT2 goto end NEXT1: REM Try next system type System\ifhw hpdiscovery.xml System\allboards.
REM ---REBOOTREQUIRED: System\reboot PXE HWNOTFOUND: End: For more information about Online ROM Flash Smart Components, see the HP Online ROM Flash User Guide on the HP Software and Driver Downloads website (http://www.hp.com/support). Erasing array configurations Before beginning the deployment process, you might want to erase the current array configuration. The commands in the following examples can be run as part of a script or alone. To erase the array configuration: 1.
4 Toolkit utilities Syntax conventions Syntax refers to the way a command and parameters must be entered. Unless specified otherwise, enter commands, parameters, and switches in all uppercase or all lowercase letters. Sample syntax line: SAMPLE[/R|-R][DRIVE:][PATH]FILENAME[...] Command element Meaning SAMPLE Specifies the name of the command. [ ] Indicates a component of the command line. Enter only the information within the brackets, not the brackets themselves.
Using toolkit utilities The Toolkit utilities control the installation process, read the source server configuration, and duplicate the configuration on a target server through a generated script file.
REBOOT command-line examples Command-line argument Description REBOOT A: This command reboots the system to the A: drive. REBOOT PXE This command reboots the system by itself to the PXE NIC. Using SETBOOTORDER SETBOOTORDER enables you to set the order in which devices are booted, including diskette drives, CD-ROM drives, hard drives, PXE, and USB devices. This utility sets the boot order only for devices that exist for a server. The devices can be set to boot in any order.
NOTE: The STATEMGR utility is not supported on 100 series servers. STATEMGR command-line syntax STATEMGR [/R | -R] [EVNAME] [/?] - or STATEMGR [/W | -W] [EVNAME] [VALUE] [/?] STATEMGR command-line arguments Command-line argument Description /R or –R This argument reads the state of the environment variable defined by [EVNAME]. The value of the environment variable is returned as a return code. /W or -W This argument writes the state defined by [VALUE] to an environment variable defined by [EVNAME].
RBSURESET command-line syntax rbsureset [/?] RBSURESET command-line arguments Command-line argument Description [/?] This argument displays help information. RBSURESET return codes Value Meaning 0 The BIOS settings have been successfully reset to the factory default. 1 The BIOS settings have not been reset. Using HPDISCOVERY HPDISCOVERY provides an inventory of the server being configured and must run on each deployed server.
Command-line argument Description filename is not in the current directory, then the full path must be specified. /f This argument chooses the name and location of the output file. If the user does not pass in this parameter, then the default filename will be hpdiscovery.xml, and it will be saved in the current directory. HPDISCOVERY return codes Value Meaning 0 The command was completed successfully. A usage message might appear. 1..255 An error has occurred. See error message for details.
IFHW return codes Value Meaning 0 The expression is true. 1 The expression is false. 2 The expression was not understood or an argument was invalid. IFHW command line examples Command-line argument Description ifhw hpdiscovery.xml allboards.
Expression input Result HWQ:ROMDate neq True if the ROM date in the hardware discovery file is not 11/12/2004 "11/12/2004" HWQ:SystemName eq "ProLiant DL380 G2" True if the system name in the hardware discovery file exactly matches "ProLiant DL380 G2" "ProLiant DL380 G2" and "PCI:Smart Array 5i" and HWQ:ROMDate eq "11/12/2004" True if the system is a ProLiant DL380 G2 with a Smart Array 5i Controller present and a ROM date of 11/12/2004 "PCI:Smart Array 5i" or "PCI:Smart Array 6i" True if the syste
HWQUERY command-line examples Command-line argument Description hwquery hpdiscovery.xml allboards.xml MY_SYS_RAM=TotalRAM For a hpdiscovery.xml file that contains 768, HWQUERY produces the following: MY_SYS_RAM=768 hwquery hpdiscovery.xml allboards.xml "TEST=Smart Array" For a hpdiscovery.xml file that indicates a Smart Array 5i Controller is present, HWQUERY produces the following: TEST=Smart Array 5i Controller hwquery hpdiscovery.xml allboards.
CONREP command-line syntax conrep [-s | -l] [-xhardware_definition_file] [-fsystem_configuration_file] [-?] CONREP command line arguments Command-line argument Description -s This argument saves the system configuration to a file. -l This argument loads the system configuration from a file and writes it to the target server. -xfilename This argument defines the name and location of the XML hardware definition file. The default file is conrep.xml.
CONREP -s (Store to Data file) Example usage for HP ProLiant 100-series servers To extract the BIOS settings from an SL160z G6 server and save the configuration to an sl160zconrep.dat data file: conrep -s -xconrepSL160zg6_20090728.xml -fsl160zconrep.dat conrep 3.00 - Scripting Toolkit Configuration Replication Program Copyright (c) 2007-2012 Hewlett-Packard Development Company, L.P.
80 86 25 a3 00 00 fa 41 0e 11 ff ff 00 00 78 c1
HPRCU return codes Command line argument Description 0 The command was completed successfully. 1 The server is not supported by this utility. 2 The input XML file is missing or invalid format. 3 One of the dependencies is missing. See error message for details. 4 The system RBSU password is set. Settings cannot be changed until the password is cleared from within RBSU. 5 An error occurred reading the supported features on the server. 6 Invalid command line syntax.
The ACU Scripting application has two scripting modes: • Capture mode for capturing a configuration (page 37) ACU inspects the configuration of all internal and external array controllers connected to the server and then writes a script file describing this configuration. • Input mode for using an Input script (page 37) ACU reads the array configuration described in a specified script file. See “Creating an ACU script file” (page 37). ACU then applies this configuration to a target system.
minimum configuration information that a valid script must have, see “Sample custom input script” (page 38). You can add blank lines and comments to any script to make it easier to read and understand. To create a comment, enter a semicolon, and then enter the comment text. ACU ignores all text on the same line after a semicolon. Sample custom input script The sample script in this section gives all possible values for each option.
OnlineSpare = None | N | Port:ID,Port:ID... | Box:Bay,Box:Bay... | Port:Box:Bay,Port:Box:Bay,... ; COMMENT: These values are available only in Custom method mode. In Auto method mode, the choices are Yes|No. Drive = * | N | Port:ID,Port:ID... | Box:Bay,Box:Bay... | Port:Box:Bay,Port:Box:Bay,... DriveType = SCSI | SAS | SATA LogicalDrive = 1|2|3|...
Category Options Description Control options can occur only once in a script file and must be listed first. Controller Controller ChassisName ClearConfigurationWithDataLoss DeleteLicenseKey DPOEnable ElevatorSortEnable ExpandPriority IRPEnable LicenseKey MNPDelay PreferredPathMode QueueDepth Options in this category specify the controller that is to be configured (or the controller that had its configuration captured).
Action mode You must specify an Action mode: • In Configure mode, you can create new arrays, but you cannot modify existing arrays. The controller must be connected to unassigned physical drives for this mode to be available. • In Reconfigure mode, you can modify existing arrays. For example, you can set up an array expansion, a logical drive extension, or a migration. These procedures do not destroy data, unless you specifically want the data to be deleted.
ChassisName Enter the user-defined character string that identifies the controller. Any of the following characters can be used in the string: a–z, A–Z, 0–9, !, @, #, *, (, ), ,, -, _, +, :, ., /, [space] You do not need to use quotation marks around the string, but doing so allows the string to begin with a space character. However, the string cannot end with a space character.
Read:write ratio RA4x00 with 16MB cache RA4x00 with 48MB cache All other controllers with battery-backed write cache All other controllers without battery-backed write cache 80:20 + + – – 75:25 – – + – 70:30 + + – – 60:40 + + – – 50:50 + + + – 40:60 – + – – 30:70 – + – – 25:75 – + + – 0:50* + – – – 0:75* – + – – 0:100 – – + – * The cache ratio percentages do not total 100 in these cases because the additional 16-MB or 48-MB cache modules are not us
Array category The Array category has the following options: • “Array” (page 44) • “Drive” (page 44) • “DriveType” (page 44) • “OnlineSpare” (page 45) Array Enter a letter or pair of letters to identify the array that is to be created or reconfigured, and observe these additional limitations: • In Configure mode, ACU creates a new array.
OnlineSpare The value for this option determines whether the array specified previously in the script will be configured with spare drives. Method mode Possible values Default value Custom To specify exactly which drives to use In Configure action mode: None as spares, use the applicable In Reconfigure action mode, ACU convention (port:ID, box:bay, or ignores any value entered for this port:box:bay).
LogicalDriveSSPState This option is valid only for controllers that enable SSP on a logical drive basis. Other controllers that support SSP use the SSPState option (page 43). The following defaults apply: • For new logical drives, the default value is Disabled. • For existing logical drives, the default value is the current logical drive setting. ParityGroups When you create a RAID 50 or RAID 60 configuration, you must also set the number of parity groups.
Size Enter the capacity that you want the logical drive to have, in megabytes. The default size setting for new logical drives is MAX. In this case, ACU creates a logical drive of the maximum possible size from the physical drives that you assigned to the array. In Reconfigure mode, the default setting is the existing size of the logical drive.
ConnectionName This option is a user-defined string used as the connection name for the specified HBA. The string can consist of the following: • A maximum of 16 characters • Embedded space characters but cannot end with a space character • Any of the following characters: a–z, A–Z, 0–9, !, @, #, *, (, ), -, _, +, :, ., /, and [space] HBA_WW_ID This option specifies which HBA, based on its assigned WWN, is modified by the configuration changes.
Error code Error message Comment or clarification 1065-1066 Too many coinciding expansion, migration, ACU does not support multiple simultaneous expansions, or extension operations. migrations, or extensions without saving the configuration between operations. Limit the number of such configuration changes in the script. 1091 Controller does not support SSP. — 1093 Controller requires physical drives to set license keys. — 1102 Slot information is not available.
Error code Error message Comment or clarification 2831 Cannot change array spare. This error message appears if you try to change the number of spares in an array when the configuration does not support the addition or subtraction of spares. 2832 Invalid physical drive. A specified physical drive is not a valid physical drive, or it cannot be placed in the array. 2833 Invalid spare. A specified spare is not a valid spare drive, or it cannot be placed in the array as a spare.
Error code Error message Comment or clarification 2851 Invalid RAID Array ID. The scripted RAID Array ID is invalid. Use characters from the set a–z, A–Z, 0–9, !, @, #, *, (, ), ,, -, _, +, :, ., /, and [space]. The ID cannot end with a space character or exceed the maximum number of characters allowed by the controller. 2852 Invalid SSP state. — 2853 Cannot change SSP settings. — 2854 Invalid SSP adapter ID. — 2855 Controller does not support logical drive SSP states.
Error code Error message Comment or clarification 2882 Invalid value for MNPDelay. Valid range is 0 (disabled) to 60 minutes. — 2883 Invalid controller configuration value. Expecting Yes or No. — 2884 Invalid value for QueueDepth. Valid range — is from 2 to 32, or Auto. Using HPLPCFG You must edit the text file to insert the WWID of the boot volume and the LUN number that the WWID boots from.
Value Meaning 5 There was no adapter or Emulex HBA found on this host. 6 There was an error retrieving the I/O address. 7 The WWID was invalid because of one of the following: • An invalid value for WWID and BootDeviceWWID, and not a hex value • The WWID specified for HBA in the .ini file does not match any HBAs found on the host (for the /l option only) 8 The LUN was invalid.
LO100CFG command-line arguments Command-line argument Description -x This argument displays example XML to perform configuration. -v This argument outputs the current copyright and version information and then exits. -s This argument captures the current status and outputs it to the console. -h The argument lists basic command line arguments and supported XML tags. -i "file.xml" This argument loads and runs the given XML configuration file. -o "file.
PAGE 56HPQLAREP return codes Value Meaning 0 The command was completed successfully. 1 There was an invalid command line option. 2 There was a file open error. 3 There was an NVRAM checksum error. 4 There was an NVRAM data error. 5 There was no adapter found on this host. 6 There was an error retrieving the I/O address. 7 The WWID was invalid. 8 The LUN setting was invalid. 9 The EFI Enable Selective LUN setting was invalid. 10 The BIOS Enable setting was invalid.
You must then invoke the tool to load the contents of hba.ini input to the HBA NVRAM: hpqlarep /l hba.ini. Using HPONCFG HP offers support for the iLO features available on ProLiant servers with the HPONCFG utility. HPONCFG is an online configuration tool used to set up and reconfigure iLO without requiring a reboot of the server operating system. The utility runs in a command-line mode and must be executed from an operating system command line.
HPONCFG return codes Value Meaning 0 The script was sent successfully to the device. 1 The script could not be sent to the device. If the script itself fails, errors are reported in the log file created by HPONCFG. HPONCFG command file contents HPONCFG can be used to perform the following tasks: • Obtain an entire configuration • Obtain a specific configuration • Set a configuration Obtaining an entire configuration HPONCFG can be used to obtain an entire configuration from iLO.
PAGE 60 Setting a configuration A specific configuration can be sent to the iLO by using the command format: HPONCFG /f add_user.xml /l log.txt In this example, the input file has the following contents: PAGE 615 Troubleshooting Troubleshooting table Issue Troubleshooting Data loss in Toolkit Improper use of the Toolkit utilities and modification of the CONREP data files can result in loss of critical data. Because of the potential data-loss risk, only experienced individuals should use the Toolkit utilities. Before using the Toolkit, all necessary precautions must be taken to ensure that mission-critical systems remain online if a failure occurs.
6 Support and other resources Information to collect before contacting HP Be sure to have the following information available before you contact HP: • Software product name • Hardware product model number • Operating system type and version • Applicable error message • Third-party hardware or software • Technical support registration number (if applicable) How to contact HP Use the following methods to contact HP technical support: • See the Contact HP worldwide website: http://www.hp.
Toolkit support E-mail support for the Scripting Toolkit is available from the HP support website (http:// h18013.www1.hp.com/products/servers/management/toolkit/smartsetup_E-support.html). Typographic conventions Table 1 Document conventions Convention Element Blue text: Table 1 (page 63) Cross-reference links and e-mail addresses Blue, underlined text: http://www.hp.
Acronyms and abbreviations ACU Array Configuration Utility ADG Advanced Data Guarding (also known as RAID 6) API application program interface BIOS Basic Input/Output System CONREP Configuration Replication utility CPQACUXE Array Configuration Utility XE CPQLOCFG Lights-Out Configuration Utility DHCP Dynamic Host Configuration Protocol DOS disk operating system GUI graphical user interface HBA host bus adapter HPDISCOVERY HP Discovery Utility HPONCFG HP Lights-Out Online Configurati
USB universal serial bus VPD vital product data WMI Windows Management Instrumentation WOL Wake-on LAN WWID World Wide ID WWN World Wide Name WWPN worldwide port name XML extensible markup language 65
Index A acronyms and abbreviations, 64 ACU script file, 37 array configurations erasing, 22 C clearing a configuration, 42 configuration capturing, 37 target server, 10 configurations capturing, 10 CONREP, 31 arguments, 32 command file contents, 34 command-line syntax, 32 data file sample HP ProLiant 100 series, 33 Load from Data file example HP ProLiant 100 series, 33 return codes, 32 screen output, 32 Store to Data file example HP ProLiant 100 series, 33 conventions document, 63 text symbols, 63 D deplo
command-line syntax, 53 return codes, 54 logical drive capacity extension, 47 U M V mass storage drivers adding, 13 MaxBoot setting, 46 Microsoft Setup Manager, 18 video performance optimization, 43 N network share creating, 8 utilities toolkit, 23 W websites, 62 Windows Preinstallation Environment, 6 adding drivers to version 2.1, 8 adding drivers to version 3.