HP Scripting Toolkit Linux Edition User Guide Abstract The 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 Minimum requirements..............................................................................................................6 2 Deployment using the Scripting Toolkit..........................................................7 Deployment overview.
HPDISCOVERY command-line syntax....................................................................................26 HPDISCOVERY command-line arguments..............................................................................26 HPDISCOVERY return codes................................................................................................26 HPDISCOVERY command-line examples................................................................................26 Using IFHW..............................
Logical Drive category...................................................................................................43 ArrayAccelerator......................................................................................................43 LogicalDrive.............................................................................................................43 LogicalDriveSSPState.................................................................................................44 ParityGroups...........
1 Introduction Scripting Toolkit The Scripting Toolkit is a server deployment product for IT experts that delivers an unattended automated installation for high-volume server deployments. This document describes how to best use the 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: HP ProLiant 100 series servers do not support all toolkit commands. See the following descriptions for utility usage. Commands 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 Toolkit website (http:// www.hp.com/go/ProLiantSTK). 2. Extract the Toolkit package on a common server that resides on the same network as the servers to be deployed. 3. Use the Linux NFS Server Configuration Tool to share the directory in which you extracted the Toolkit package and to assign read and write permissions for all hosts.
6. Mount the network share: mkdir /mnt/toolkit_share 7. Capture a hardware discovery report using the HPDISCOVERY utility: cd /mnt/toolkit_share/utilities 8. Capture the system BIOS configuration using the CONREP utility: cd /mnt/toolkit_share/utilities ./conrep -s -f/mnt/toolkit_share/data_files/conrep.dat 9. Capture the Smart Array configuration using the ACU utility: cd /mnt/toolkit_share/utilities/hpacuscripting ./hpacuscripting -c /mnt/toolkit_share/data_files/hpacuscripting.dat 10.
4. Load appropriate storage controller drivers: modprobe -f cciss 5. Load the channel interface driver for iLO: insmod /opt/hp/hp-ilo/bin/`uname -r`/hp_ilo.ko 6. Mount the network share: mkdir /mnt/toolkit_share 7. Apply the system BIOS configuration using the CONREP utility: ./conrep -l -f/mnt/toolkit_share/data_files/conrep.dat 8. Apply the Smart Array configuration using the ACU utility: cd /mnt/toolkit_share/utilities/hpacuscripting 9.
3 Booting and OS installation SYSLINUX SYSLINUX is a free third-party bootloader available at the SYSLINUX web page (http:// syslinux.zytor.com/index.php). SYSLINUX is a suite of programs that perform various boot functions. The Scripting Toolkit uses the following bootloader programs: • isolinux.bin—Boot from ISO media. • pxelinux.0—Boot using PXE protocol. • ldlinux.sys—Boot from a USB drive key. The bootloaders each require a configuration file to run: • isolinux.
Setting up a PXE boot environment requires the following general steps: 1. Set up a DHCP server with the appropriate options. 2. Set up a TFTP server with the appropriate options. 3. Populate the TFTP directory share with the Linux Toolkit boot components. These steps assume that a Linux workstation is used as the DHCP/TFTP server. You might need to download additional components and adapt the following instructions to suit your environment.
server = /usr/sbin/in.tftpd server_args = -s /tftpboot disable = yes per_source = 11 cps = 100 2 } In this example, disabled is the default setting, and /tftpboot is the root directory for all client access. To enable the TFTP service on your server, edit the disable line to read: disable = no Populating the TFTP directory share Use the /tftpboot directory from the “Setting up a TFTP server” (page 12) section as the directory where TFTP clients get their files. To populate the TFTP directory share: 1.
Booting from a USB drive key Some applications require the use of a writable medium. While booting from CD is not suitable for this purpose, a USB drive key provides the ideal medium as a writable medium. NOTE: Booting from a USB drive key is supported only on certain ProLiant servers. For more information, see the HP S PP website (http://www.hp.com/go/spp). To set up a USB drive key to boot the Toolkit environment: 1. Download ss_toolkit.linux.tar.gz@8.40_pubsw-linux_en from (http:// www.hp.com).
The scripting for these steps must be adapted to your server deployment process. In particular, be sure to change the IP address and path of the NFS server to match your environment. You might also need to make other modifications, such as adding extra configuration steps (for instance, running HPONCFG to configure iLO) or additional servers. The sample install_rhel4.sh script is similar to the following: #!/bin/bash ## this script's methods work for RHEL 5 ## SAMPLE.
./ifhw ${HPDISCOVERY_FILE} allboards.xml "PCI:Smart Array 6i Controller" 2> /dev/null if [ $? = 0 ] ; then cd ${TOOLKIT}/hpacuscripting ./hpacuscripting -i ../data_files/dl380g4_sa6i_hpacuscripting.dat fi # Apply Array Configuration for Smart Array P600 Controller if present ./ifhw ${HPDISCOVERY_FILE} allboards.xml "PCI:Smart Array P600 Controller" 2> /dev/null if [ $? = 0 ] ; then cd ${TOOLKIT}/hpacuscripting ./hpacuscripting -i ../data_files/dl380g4_p600_hpacuscripting.
echo "" echo "Rerun hardware discovery to find boot device" ./hpdiscovery -f ${HPDISCOVERY_FILE} ## use hwquery to fetch the boot dev node from hardware discovery file. if [ -z ${BOOTDEVNODE} ]; then export `./hwquery ${HPDISCOVERY_FILE} allboards.xml BOOTDEVNODE=DevNode` fi echo "Boot Device=${BOOTDEVNODE}" if [ -z ${BOOTDEVNODE} ]; then echo "MISSING boot device dev node. Check that the drivers are loaded.
umount /mnt/dos umount ${NFS_MAIN} ## unmount everything else #umount -a #echo "Rebooting" #sleep 5 #/bin/reboot c: Microsoft Windows install_win.sh sample script The install_win.sh sample script performs many of the same hardware configuration tasks described in “Performing an unattended operating system installation” (page 14). Additionally, the sample install_win.
keyboard "us" zerombr yes clearpart --Linux part /boot --size 30 part swap --size 128 part / --size 100 --grow install mouse genericps/2 timezone Etc/GMT-6 #xconfig --server "Mach64" --monitor "generic monitor" skipx rootpw iscrypted $1$ltK6jzho$7pPbE8WPNAeg44UlXqG27 auth --useshadow --enablemd5 lilo --location partition reboot %packages ElectricFence setup filesystem basesystem ldconfig glibc shadow-utils mkkickstart mktemp termcap libtermcap bash MAKEDEV SysVinit XFree86-Mach64 ncurses info grep XFree86-l
authconfig autoconf automake yp-tools ypbind ypserv zlib zlib-devel %post The previous example contains a limited list of packages to be installed. Add to this section any other packages to be installed. The server deployment configuration and operating system installation process is complete.
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][PATH]FILENAME[...] Command element Description SAMPLE Specifies the name of the command. - Indicates a command line switch for executable files.
The Toolkit utilities include: • REBOOT • SETBOOTORDER (Limited functionality for HP ProLiant 100 series servers) • STATEMGR (Utility is not supported on 100 series servers) • RBSURESET • BOOTEXTRACT • HPDISCOVERY • IFHW • HWQUERY • CONREP • HPRCU • HPACUSCRIPTING • 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 REBOOT, together with other util
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 BOOTEXTRACT BOOTEXTRACT is used to extract the boot sector files from Windows Server 2003. These files can be used later in the installation of Windows Server 2003.
• Processor information • NIC information • PCI devices present in the system • HP Smart Array controller information User process decisions can be made based on data that is in the file created by this utility. NOTE: Information may not be as detailed on HP ProLiant 100 series servers.
Command-line argument Description discovery into device names, such as "Smart Array 5i Controller." This argument specifies the query expression. See “Expression operators and terms” (page 27). 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 examples Expression input Result "PCI:Smart Array 5i" True if the Smart Array 5i Controller is found in the system HWQ:TotalRAM gte 512 True if the amount of RAM in the hardware discovery file is at least 512 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:R
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: [root@ilo002481b08134 conrep]# ./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
Command line argument Description -f{file.xml} Name of the input or output file. If not specified, the XML configuration defaults to hprcu.xml. -h This argument displays program usage. 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.
Users familiar with the previous versions of ACU Scripting must now install the ACU CLI application to obtain the scripting executable. The new ACU scripting executable (hpacuscripting) replaces the former executable (cpqacuxe) in all scripts.
Creating an ACU script file To create a valid ACU script file, use one of the following methods: • Modify the sample custom input script (page 36). • Create a Capture file for capturing a configuration (page 35). You can create a capture file from any server that has ACU loaded, and then modify the values of options in the file as necessary for the target system. This method is useful for applying a standard configuration to several servers that have similar storage resources.
PreferredPathMode = Auto|Manual ; COMMENT: the following five entries are used to optimize the controller performance for video MNPDelay = 0|1|2|...|60 ; units are minutes, zero indicates disabled IRPEnable = Yes|No DPOEnable = Yes|No ElevatorSortEnable = Yes|No QueueDepth = 2|4|8|16|32|Auto Array = A|B|C|D|E|F|G|...Z|a|b|c|d|e|f 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.
The options for each category are listed in the following table and described in more detail in the remainder of this section. Category Options Description Control Action These options define the overall behavior of ACU when it processes scripts and creates configurations. Control options can occur only once in a script file and must be listed first.
Control category The Control category has the following options: • “Action mode” (page 39) • “Method mode” (page 39) 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.
• WWN [N]—Configure the external controller that has the World Wide Name N. • SerialNumber [N]—Configure the shared storage controller that has serial number N. • IOCabinet[N],IOBay[N],IOChassis[N],Slot[N],Cabinet[N],Cell[N]—Configure the controller in the Integrity server that has the slot path information defined by this sequence of identifiers. ChassisName Enter the user-defined character string that identifies the controller.
A "+" indicates that the specified cache ratio is allowed for that type of controller, while a "–" indicates that the ratio is not allowed.
In addition, do the following: • Set the MNPDelay to any integer value from 1 to 60 (units are minutes). If you want to disable this option, set a value of zero instead. • Set the QueueDepth to any integer value from 2 to 32, or to Auto.
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 41). 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 54HPQLAREP 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. There is an error in xml. 2 The Management processor is not present, or the driver is not running. 3 The iLO flash is still in progress. 255 The script is unable to create an output file. If the script itself fails, errors are reported in the log file created by HPONCFG.
PAGE 58 Setting a configuration A specific configuration can be sent to the iLO by using the command format: HPONCFG /f add_user.xml /l log.
5 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 61) Cross-reference links and e-mail addresses Blue, underlined text: http://www.hp.
Acronyms and abbreviations ACU Array Configuration Utility 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 FAT file allocation table GUI graphical user interface HBA host bus adapter HPDISCOVERY HP Discovery Utility HPONCFG HP Lights-Out Online Configuration utility HPQLAREP HP QLogic FC HBA BIOS configuration ut
SLES SUSE Linux Enterprise Server SPP HP Service Pack for ProLiant SSP Selective Storage Presentation STATEMGR State Manager utility TFTP Trivial File Transfer Protocol USB universal serial bus VPD vital product data WOL Wake-on LAN WWID World Wide ID WWN World Wide Name WWPN worldwide port name XML extensible markup language 63
Index A acronyms and abbreviations, 62 ACU script file, 36 anaconda-ks.
operating system, 10 unattended operating system, 14 ISO image arguments, 9 L LO100CFG, 51 arguments, 52 command file, 52 command-line syntax, 51 return codes, 52 logical drive capacity extension, 45 arguments, 24 command-line examples, 24 command-line syntax, 24 return codes, 24 support, 60 symbols in text, 61 syntax conventions, 21 SYSLINUX, 11 T network share creating, 8 NFS Server Configuration Tool, 8 target server configuring, 9 technical support, 60 text symbols, 61 TFTP directory share PXE boot