HP Scripting Toolkit for Windows 9.60 User Guide Abstract This document provides information about the Scripting Toolkit for Windows utilities and how best to use the Scripting Toolkit for Windows to configure HP ProLiant servers and BladeSystem infrastructure in a Windows environment. This document is intended for IT experts with experience in scripting operating system installations and configuring HP ProLiant server hardware.
Notices © Copyright 2005, 2014 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 for Windows.....................................................................................................6 Microsoft Windows Preinstallation Environment.............................................................................6 Minimum requirements..............................................................................................................
IFHW command-line syntax.................................................................................................21 IFHW command-line arguments...........................................................................................22 IFHW return codes.............................................................................................................22 IFHW command line examples............................................................................................
PreferredPath...........................................................................................................39 RAID.......................................................................................................................39 Sectors....................................................................................................................40 Size........................................................................................................................
1 Introduction Scripting Toolkit for Windows The Scripting Toolkit for Windows is a server deployment product that delivers an unattended automated installation for high-volume HP ProLiant server and BladeSystem infrastructure deployments. This document describes how to best use the Scripting Toolkit to configure HP ProLiant servers and BladeSystem infrastructure. It also contains information about the Scripting Toolkit utilities and how to use them in an unattended environment.
2 Deployment using the Scripting Toolkit for Windows 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: HP ProLiant 100-Series servers previous to Gen8 do not support all Scripting 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 package from the Scripting Toolkit website at http://www.hp.com/go/ProLiantSTK. 2. Install the Scripting Toolkit package 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 Scripting Toolkit. Be sure that the account you use has read and write access. 4.
is installed and the STK IO driver (hpsstkio.sys) is copied to the windows\system32\ drivers directory. To add drivers offline: 1. Mount the base image to a local directory by using dism. For example: dism /Mount-Wim /WimFile:C:\winpe_x86\winpe.wim /index:1 MountDir:C:\STK.TMP 2. Add the .inf file to the base image by using the dism /Add-Driver command. For example: dism /image:C:\SSSTK.TMP /Add-Driver /driver:C:\ssstk\drivers\example.inf 3. For each additional device driver repeat steps 1 and 2.
3. For each additional device driver repeat steps 1 and 2. When you finish customizing the image, prepare the image for deployment by using the peimg /prep command. NOTE: If the appropriate iLO driver is not installed, some utilities do not work correctly. For more information, see the README.txt file located with the drivers. To add drivers online: 1. Use the drvload tool, drvload.exe inf_path, where inf_path is the path to a device driver INF file. drvload x:\drivers\example.inf 2.
Configuring the target server and installing the operating system 1. 2. Boot the media (CD/DVD, USB drive key, or PXE) that contains the customized Windows PE image on the target server. Run CONREP to configure the target server with the captured settings: a. Change to the directory where CONREP resides. b. Apply the captured configuration to the target server: conrep -l -fs:\data\filename 3. Run HPSSASCRIPTING to configure the storage of the target server with the captured settings: a.
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 Scripting 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.
.\SSA\bin\hpssascripting.exe -i .\ArraySettings\SA6iArray.ini :NEXT2 \ifhw .\hpdiscovery.xml allboards.xml PCI:"Smart Array 5312" if errorlevel 1 GOTO NEXT3 .\SSA\bin\hpssascripting.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.
System\ifhw hpdiscovery.xml System\allboards.xml HWQ:SystemName eq "ProLiant DL380 G2" if errorlevel 1 goto NEXT1 REM ---REM This section performs the System ROM Flash. Online Flash components REM are kept in a directory called Roms REM ---Roms\cp004648.
NEXT3: REM ---REM DONE REM ---REBOOTREQUIRED: System\reboot PXE HWNOTFOUND: End: 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. Use the Microsoft DiskPart utility to clear the partition table: a. Create a script file called ErasePart.txt that contains the following commands: REM This file instructs Diskpart.
4 Scripting 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.
The Scripting Toolkit utilities include: • REBOOT • SETBOOTORDER (Limited functionality for HP ProLiant 100 series servers) • STATEMGR (Utility is not supported on 100 series servers) • RBSURESET • HPDISCOVERY • IFHW • HWQUERY • CONREP • HPRCU • HPSSASCRIPTING • HPLPCFG • LO100CFG (Utility only supports HP ProLiant 100 series servers) • HPQLAREP • HPONCFG (Not supported on HP ProLiant 100 series servers using the Oxx ROM family) Using REBOOT The REBOOT utility enables the user to
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 CD-ROM or DVD 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.
Using STATEMGR The STATEMGR utility enables the user to keep track of the execution state during system reboots. This utility saves persistent state information across reboots of the system. NOTE: The STATEMGR utility is not supported on 100 series servers. STATEMGR command-line syntax STATEMGR [-R] [EVNAME] [-h] - or STATEMGR [-W] [EVNAME] [VALUE] [-h] STATEMGR command-line arguments Command-line argument Description –R This argument reads the state of the environment variable defined by [EVNAME].
RBSURESET does not erase array configurations or logical storage volumes. RBSURESET command-line syntax rbsureset [-h] RBSURESET command-line arguments Command-line argument Description [-h] This argument displays help information. RBSURESET return codes Value Meaning 0 The BIOS settings have been successfully reset. 1 Incorrect command line. Using HPDISCOVERY HPDISCOVERY provides an inventory of the server being configured and must run on each deployed server.
Command-line argument Description –c This argument chooses the name and location of the configuration file. If the user does not pass in this parameter, then the default filename will be hpdisc_plugins.dat, and it will be saved in the current directory. –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.
IFHW command-line arguments Command-line argument Description [drive:][path]hpdiscoveryfilename This argument specifies the hardware discovery file used to run the query. [drive:][path]allboards.xml This argument specifies the allboards.xml PCI device list file, which is used to convert PCI IDs found in hardware discovery into device names, such as "Smart Array 5i Controller." This argument specifies the query expression. See "Expression operators and terms (page 22).
Operator or term Result HWQ: The hardware discovery file is searched for , and the corresponding value is the value of this term. is case-sensitive.
HWQUERY return codes Value Meaning 0 The command was completed successfully. n N arguments were ignored because they were not in the variable= format. 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.
www.hp.com on the support page for each platform. You can use these files with the -x option to configure systems that are not supported by the default hardware configuration file. Many fields in the conrep.xml file contain help text that enables you to configure the field meanings. This information is also added to the conrep.dat file. Hardware features that are not supported by the existing platform or ROM version appear in the conrep.dat file.
CONREP screen output A typical screen output generated by CONREP is similar to the following: conrep 3.00 - Scripting Toolkit Configuration Replication Program Copyright (c) 2007-2012 Hewlett-Packard Development Company, L.P. System Type: ProLiant DL360 G4 ROM Date: 08/16/2005 ROM Family: P52 XML System Configuration: conrep.xml Hardware Configuration: demo.
Processor Manufacturer : Intel XML System Configuration : conrep_SL160zg6_20090728.xml Hardware Configuration : sl160zconrep.dat Loading configuration from sl160zconrep.dat.
CONREP command file contents A typical data file generated by the CONREP command is similar to the following: PAGE 29Using HPRCU has the following features: • All system ROM settings and the current selections are listed together in one output/input XML file. • No updated binary or XML file is needed when BIOS adds or changes features. HPRCU now reads the same tables that RBSU does, which are located in the memory at system boot. When the BIOS changes or adds a new setting, no update to HPRCU is needed. • The HPRCU XML file shows the default settings for each RBSU option.
ProLiant DL380 Gen8 P64 11/01/2011 Intel(R) Hyperthreading Options
Using an Input script To use an Input script to configure or reconfigure a system, first locate a suitable HP SSA script or see “Creating an HP SSA script file” (page 31). Then, enter the following command at the system command line prompt: hpssascripting -i [drive:][path]FILENAME.ext [-internal | -external] [-reset] -e [drive:][path]ERRORFILENAME.ext FILENAME is the name of the HP SSA input file, and ext is the file extension.
Controller = All | First | Slot [N][:N]| WWN [N]| SerialNumber [N]| IOCabinet [N],IOBay [N],IOChassis [N],Slot [N],Cabinet [N],Cell [N] ClearConfigurationWithDataLoss = Yes|No ; COMMENT: This option is now deprecated. LicenseKey = XXXXX-XXXXX-XXXXX-XXXXX-XXXXX DeleteLicenseKey = XXXXX-XXXXX-XXXXX-XXXXX-XXXXX | * ; COMMENT: * is a wild card that enables you to delete all license keys on the specified controller.
ConnectionName = UserDefinedName HostMode = Default | Windows | Windows(degrade | openVMS | Tru64 | Linux | Solaris | Netware | HP | Windows Sp2 ; COMMENT: The Windows(degrade value must be entered as written.
Category Options Description ParityGroups Although the LogicalDrive option must begin this section of the script, you can script the other options in this category in any order. PreferredPath RAID Sectors Size SSPAdaptersWithAccess StripeSize HBA ConnectionName Use these options to specify an HBA you are configuring.
• QueueDepth (page 37) • ReadCache (page 36) • RebuildPriority (page 36) • SSPState (page 36) • SurfaceScanDelay (page 37) • WriteCache (page 36) Controller You must enter a value for this option because it identifies the controller that you want to configure: • All—Configure all detected controllers in the system. • Slot [N][:M]—Configure the internal controller in slot number N, or the external controller at port M in slot N.
Not all controllers support this feature, and controllers in an active/standby configuration disregard this option. • Auto is the default setting for new configurations. In this case, the storage system automatically selects the I/O path from the redundant controller to the logical drive and dynamically load balances all paths. • Manual enables you to assign the logical drive to a specific redundant controller. If you select this setting, use the PreferredPath command to specify the path.
NOTE: The SSPState option is valid only for controllers that enable SSP on a controller basis, such as the MSA1000 or the Smart Array Cluster Storage controllers. RA4x00 controllers support SSP that is enabled on a logical drive basis, and use the LogicalDriveSSPState option (page 39) instead. If you enable SSP, you must also specify an adapter for one or more logical drives by using the SSPAdaptersWithAccess option (page 40). Otherwise, SSP is automatically disabled.
If you use Custom method mode, choose one of the following methods to specify the drives to be used in the array. Different arrays on the same controller can use different methods. • To specify individual drives, use the applicable convention (port:ID, box:bay, or port:box:bay). • To specify only the number of drives to use (not which specific drive IDs to use), enter that number as the value for this option.
ArrayAccelerator This option specifies whether the array accelerator is enabled or disabled for the specified logical drive. The default value is Enabled. LogicalDrive The value that you enter for this option specifies the ID number of the logical drive that is to be created or modified. The first logical drive on an array must have an ID of 1 (not 0), and logical drive numbering must be contiguous. • In Configure action mode, HP SSA accepts only the ID number of the next possible logical drive.
Sectors This option specifies the number of sectors that are to comprise each track. Enter 32 to disable MaxBoot or 63 to enable it. • For new logical drives, the default setting is 63 if the logical drive is larger than 502 GB. Otherwise, the default setting is 32. • For an existing logical drive, the default setting is the existing setting. Logical drive performance is likely to decrease with MaxBoot enabled. Size Enter the capacity that you want the logical drive to have, in megabytes.
size, HP SSA attempts to migrate the logical drive to the stripe size that you specify. (If you intend to migrate the logical drive, back up all data before starting the migration procedure.) HBA category The HBA category has the following options: • “ConnectionName” (page 41) • “HBA_WW_ID” (page 41) • “HostMode” (page 41) ConnectionName This option is a user-defined string used as the connection name for the specified HBA.
Error code Error message Comment or clarification 516 Internal error. An error occurred during the configuration process, but HP SSA cannot identify the error because there is an internal HP SSA error. 1052 Array requires an odd number of drives. This error message occurs if you attempt to add an odd number of drives to an array that has RAID 1 logical drives, and the controller does not support RAID-level migration. 1053 Cannot remove physical drives from existing array.
Error code Error message Comment or clarification 2826 Array not specified. The script file has commands that require an array, but no array is specified. 2827 New array ID does not match the next available array ID. The scripted array ID is not the next ID in sequence, based on the IDs of the existing arrays. For example, only array A exists and the script file specifies creation of array C (omitting array B). 2828 New array ID already exists.
Error code Error message Comment or clarification 2844 Invalid stripe size. The specified stripe size is invalid, or not supported by the current RAID level, or not possible with the current configuration. 2845 Invalid sectors. The specified MaxBoot setting is invalid or is not possible with the current configuration. 2846 Cannot change logical drive sectors. You cannot change the MaxBoot setting on a configured logical drive because doing so causes data loss.
Error code Error message Comment or clarification 2873 is not a Logical Drive command. The command does not belong in the Logical Drive section of the script file. 2874 is not an HBA command. The command does not belong in the HBA section of the script file. 2875 More than one command cannot exist in the same section. — 2876 Invalid physical drive count. The script specifies more drives than are available of the specified drive type.
Command-line argument Description BootDeviceWWID=22334455 Your input or current value when read from HBA BootDeviceLUN[0]=1111 Your input, default LUN, or current value when read from HBA HPLPCFG 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 or Emulex HBA found on this host.
You must then invoke the tool to load the contents of hba.ini input to the HBA NVRAM: hplpcfg /l hba.ini. Using LO100CFG NOTE: This section applies only to HP ProLiant servers not using the Oxx ROM family. LO100CFG enables you to configure the LightsOut 100 device that is available on the HP ProLiant 100 series servers. Under Windows, WMI is used through the Microsoft_IPMI class, make sure WMI is installed in the Windows PE environment. LO100CFG command-line syntax lo100cfg [ -h | -x | -v | -i "file.
Value Meaning 102 Field in the XML file has invalid values. Valid fields still applied. 103 The Lights Out 100 returned a code the application did not expect. See console output for code returned from the LO100 processor. 104 System is unsupported or is not running IPMI drivers. NOTE: Return codes of 100 or higher are returned from the LO100 processor.
HPQLAREP command-line arguments Command-line argument Description hpqlarep —s filename This argument saves the HBA configuration to the filename. hpqlarep —l filename This argument loads the HBA configuration to the filename.
HPQLAREP command-line examples hpqlarep —s hba.ini generates hba.ini with the following content: [HBA0] WWID=11111111 HostAdapterBiosEnable=1 SelectBootEnable=1 BootDeviceWWID= BootDeviceLUN[0]= You must edit hba.ini and add the following boot device information: [HBA0] WWID=11111111 HostAdapterBiosEnable=1 SelectBootEnable=1 BootDeviceWWID=22222222 BootDeviceLUN[0]=3 You must then invoke the tool to load the contents of hba.ini input to the HBA NVRAM: hpqlarep –l hba.ini.
Command-line argument Description -f filename This argument sets the iLO configuration based on the information in the XML input file named filename. -l filename This argument logs replies to the text log file named filename. -w filename This argument writes the iLO configuration obtained from the device to the XML output file named filename. -get_hostinfo This argument returns the host server name and serial number.
PAGE 53 The XML commands are read from the input file get_global.xml and are processed by the device: HPONCFG /f get_global.xml /l log.txt > output.txt The requested information is returned in the log file, which, in this example, is named log.txt.
5 Troubleshooting Troubleshooting table 54 Issue Troubleshooting Data loss in STK Improper use of the Scripting 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 Scripting Toolkit utilities. Before using the Scripting 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.
Typographic conventions Table 1 Document conventions Convention Element Blue text: Table 1 (page 56) Cross-reference links and e-mail addresses Blue, underlined text: http://www.hp.
With specific authorization from you, an authorized HP Channel Partner can also view your IT environment remotely at HP Insight Online. For more information, see the following documents on the HP website (http://www.hp.com/go/ insightremotesupport/docs): • For more information about using HP Insight Online, see the HP Insight Online User’s Guide.
7 Documentation feedback HP is committed to providing documentation that meets your needs. To help us improve the documentation, send any errors, suggestions, or comments to Documentation Feedback (docsfeedback@hp.com). Include the document title and part number, version number, or the URL when submitting your feedback.
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 CPQLOCFG Lights-Out Configuration Utility CQPSSAXE Smart Storage Administrator XE 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
WMI Windows Management Instrumentation WOL Wake-on LAN WWID World Wide ID WWN World Wide Name WWPN worldwide port name XML extensible markup language 60 Acronyms and abbreviations
Index erasing array configurations, 15 expression examples, 23 expression operators and terms, 22 return codes, 21 HPLPCFG, 45 arguments, 45 command-line examples, 46 command-line syntax, 45 return codes, 46 HPONCFG, 50 arguments, 50 command file, 51 entire configuration, 51 setting a specific configuration, 53 specific configuration, 52 command-line examples, 53 command-line syntax, 50 return codes, 51 HPQLAREP, 48 arguments, 49 command-line examples, 50 command-line syntax, 48 return codes, 49 HPRCU, 28
arguments, 47 command file, 48 command-line syntax, 47 return codes, 47 logical drive capacity extension, 40 M MaxBoot setting, 40 N network share creating, 8 O online help, 16 Online ROM Flash Component Utility, 13 operating system installation, 11 operators and terms, 22 R RBSURESET, 19 arguments, 20 command-line syntax, 20 return codes, 20 REBOOT, 17 arguments, 17 command-line examples, 18 command-line syntax, 17 return codes, 17 ROM updating, 13 S Scripting Toolkit utilities, 16 SETBOOTORDER, 18 ar