white paper - irmc remote scripting and...

15
White Paper iRMC Remote Scripting and Configuration Page 1 of 15 www.fujitsu.com/fts/serverview White Paper iRMC Remote Scripting and Configuration This White Paper describes how to use in Fujitsu PRIMERGY servers the integrated Remote Management Controller’s (iRMC) internal “Data Format Specification File” to configure iRMC settings remotely and use this mechanism for unattended remote deployment of iRMC parameters. Content Introduction 2 iRMC Configuration Data 2 Overview 2 Advantages through this Implementation 2 Restrictions and Known Limitations 3 SCCI File Format 3 Export of Configuration Data from the iRMC 5 Export of Configuration Data with cURL 5 Import of Configuration Data 6 Scripted Configuration of the iRMC Family 7 Supported SCCI Commands in iRMC S2 / iRMC S3 / iRMC S4 7 iRMC S2 / iRMC S3 Specific Commands 7 iRMC S4 Specific Commands 7 Scripting with cURL 8 Generating Encrypted Passwords with iRMC_PWD.exe 8 Change BIOS Parameters via iRMC 9 BIOS Single Parameter Restoration via cURL 9 Error Checking and Reporting 9 Automatic Power-on After BIOS Single Parameter Restore 10 Remote scripted update of BIOS and iRMC 10 Updating iRMC Firmware from File 10 Updating BIOS from File 11 Checking an iRMC Firmware or BIOS Update Progress 11 Error Checking and Progress Reporting 11 Sample Scripts 13 Attachments 15 Glossary 15

Upload: nguyenngoc

Post on 30-Mar-2018

232 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: White Paper - iRMC Remote Scripting and …manuals.ts.fujitsu.com/file/12563/wp-svs-irmc-remote...White Paper iRMC Remote Scripting and Configuration Page 2 of 15 Introduction Within

White Paper iRMC Remote Scripting and Configuration

Page 1 of 15 www.fujitsu.com/fts/serverview

White Paper iRMC Remote Scripting and Configuration

This White Paper describes how to use in Fujitsu PRIMERGY servers the integrated Remote Management Controller’s (iRMC) internal “Data Format Specification File” to configure iRMC settings remotely and use this mechanism for unattended remote deployment of iRMC parameters.

Content

Introduction 2 iRMC Configuration Data 2

Overview 2 Advantages through this Implementation 2 Restrictions and Known Limitations 3 SCCI File Format 3 Export of Configuration Data from the iRMC 5 Export of Configuration Data with cURL 5 Import of Configuration Data 6

Scripted Configuration of the iRMC Family 7 Supported SCCI Commands in iRMC S2 / iRMC S3 / iRMC S4 7 iRMC S2 / iRMC S3 Specific Commands 7 iRMC S4 Specific Commands 7 Scripting with cURL 8 Generating Encrypted Passwords with iRMC_PWD.exe 8

Change BIOS Parameters via iRMC 9 BIOS Single Parameter Restoration via cURL 9 Error Checking and Reporting 9 Automatic Power-on After BIOS Single Parameter Restore 10

Remote scripted update of BIOS and iRMC 10 Updating iRMC Firmware from File 10 Updating BIOS from File 11 Checking an iRMC Firmware or BIOS Update Progress 11 Error Checking and Progress Reporting 11

Sample Scripts 13 Attachments 15 Glossary 15

Page 2: White Paper - iRMC Remote Scripting and …manuals.ts.fujitsu.com/file/12563/wp-svs-irmc-remote...White Paper iRMC Remote Scripting and Configuration Page 2 of 15 Introduction Within

White Paper iRMC Remote Scripting and Configuration

Page 2 of 15 www.fujitsu.com/fts/serverview

Introduction Within Fujitsu PRIMERGY servers the ServerView integrated Remote Management Controller (iRMC) enables extensive monitoring and management functions. To perform the tasks of a Baseboard Management Controller (BMC) a large number of various iRMC settings have to be defined and maintained. In smaller IT environments users commonly access a server manually before installing any operating system and prepare its configuration for the upcoming setup. Looking at the same situation in a larger environment with more servers, this method does not come in that handy anymore due to the big effort involved when preparing each and every single server manually. In order to pre-configure and deploy PRIMERGY servers in a more automated approach Fujitsu introduced the scripting functionality for the iRMC. With scripting only one iRMC has to be configured according to the requirements of an environment; this configuration is then uploaded to all other PRIMERGY servers without the need to access them all one by one. This document explains: how Fujitsu’s integrated Remote Management Controller stores its settings, which possibilities are given to set and change them how these configuration settings can be uploaded automatically to other PRIMERGY servers via the scripting interface Furthermore, this white paper shows how an unattended iRMC update as well as the system’s BIOS firmware is deployed. Finally, it describes a way for changing BIOS parameters via a script using the iRMC’s restoration mechanism.

iRMC Configuration Data

Overview

The iRMC family firmware stores internal configuration data in different NVRAM sections, namely the Fujitsu specific ConfigSpaces. Some configuration data is mapped internally by the firmware to be accessible via ConfigSpace access methods. For instance the DNS servers and DNS configuration can be accessed via IPMI LAN configuration parameters, or via ConfigSpace. Both methods access the same low level data structures in the original NVCFG (nonvolatile configuration) area. External tools, such as the ServerView Agents or the SCU (Server Configuration Utility) or IPMIVIEW might provide additional mapping of standard IPMI related commands and configuration items, such as standard IPMI user configuration or IPv4 network configuration in order to abstract the IPMI BMC layer from higher software levels. The Server Control Command Interface (SCCI) is a generic API defined by Fujitsu for different server management controller hardware as well as server management software. It can be easily extended to new commands or to new configuration items. Starting with the iRMC S2 firmware 5.20A (IPv6 version) remote configuration and scripting via the http://<iRMC IP address>/config URL is supported. Please note, that this interface is mainly for remote configuration and is not a SCCI implementation. It only uses the command and configuration definitions from SCCI and the file format.

Advantages through this Implementation

Remote configuration of the iRMC via web based access provides the following advantages: Uses HTTP/HTTPS POST operation for file upload to the iRMC S2 / iRMC S3 / iRMC S4. No special tool is required, any

generic tool or scripting environment which supports authenticated HTTP / HTTPS POST operations can be used Uses built-in authentication and authorization methods of the iRMC web server A remote user gets the same permissions for configuration as they get with an interactive logon to the iRMC Support for HTTP 1.1 Basic and Digest authentication based on RFC2617 with local iRMC user accounts Optional built-in strong encryption with standard HTTPS based access Can be used with centralized Directory / LDAP user accounts and HTTP 1.1 Basic authentication

Note: When HTTP 1.1 Basic authentication is used, it is recommended to use HTTPS as protocol for encryption and confidentiality in order to protect the username / password

Configuration file format is based on XML. The file can be manually edited or exported from a reference installation as well as exported from the SCU (Server Configuration Utility)

The configuration file can be re-used with other SCCI based installation methods (SCU or other) Can be easily extended to new configuration items or new supported SCCI commands

Page 3: White Paper - iRMC Remote Scripting and …manuals.ts.fujitsu.com/file/12563/wp-svs-irmc-remote...White Paper iRMC Remote Scripting and Configuration Page 2 of 15 Introduction Within

White Paper iRMC Remote Scripting and Configuration

Page 3 of 15 www.fujitsu.com/fts/serverview

Restrictions and Known Limitations

All commands specified in the XML file (also a .pre-file type can be used) are normally executed sequentially, one command after the other. Exemptions from this rule are listed below: IPv4 and VLAN network configuration:

These commands are executed at the end of a command sequence in order to prevent broken network connectivity SSL certificate and matching private key:

These are executed at the end of a command sequence. Both components have to be present in the same XML file (also a .pre file type can be used) and are checked for valid formats and for correct file types

If a power management operation for the managed server or a reboot of the iRMC itself is required or desired, it is recommended

(but not required) to use separate command files for these commands, e.g. divide configuration and power management tasks into separate tasks.

Optional delays between commands have to be performed outside of the script, e.g. divide the script into separate scripts and perform the delay between sending of the files with the operation possibilities of the client.

SCCI File Format

The format of the used XML configuration file is taken from the file “Setup Configuration” help file which is installed together with the ServerView Agents on Windows platforms. The following is a copy of this description with iRMC specific notes. The configuration file is based on XML syntax. Every configuration setting is a simple XML fragment starting with a <CMD> tag.

All configuration settings are enclosed with a <CMDSEQ> tag. A typical command sequence including two configuration settings might look like this:

<CMDSEQ>

<CMD Context="SCCI" OC="ConfigSpace" OE="3800" OI="0" Type="SET">

<DATA Type="xsd::hexBinary" Len="1">04</DATA>

<CMD Context="SCCI" OC="ConfigSpace" OE="3801" OI="0" Type="SET">

<DATA Type="xsd::hexBinary" Len="1">00</DATA>

</CMD>

</CMDSEQ>

The parameter Context is used internally to select the provider for the operation. Currently only SCCI (Server Control Command Interface) is supported. SCCI provider specific command parameters:

Operation Code (OC) Hex value or string for the Command / Operation Code. Note: The iRMC supports only a limited set of SCCI commands. For a list of supported commands see here.

Operation Code Extension (OE) Hex value for extended operation codes. If the value is missing OE=0 is assumed. For ConfigSpace Read-/Write operations this defines the ConfigSpace ID.

Object Index (OI) A hex value selecting an instance of an object. If the value is missing OI=0 is assumed.

Operation Code Type (Type) For configuration settings the values GET (read operation) and SET (write operation) are supported. If the value is missing Type=GET is assumed.

Cabinet Identifier (CA) The Cabinet Identifier allows the selection of extension cabinets using their cabinet ID number. For request to the system cabinet the parameter should not be used! Note: The iRMC does not support the CA command parameter.

Data (DATA) SET operations require data. Data are described by their data types.

Page 4: White Paper - iRMC Remote Scripting and …manuals.ts.fujitsu.com/file/12563/wp-svs-irmc-remote...White Paper iRMC Remote Scripting and Configuration Page 2 of 15 Introduction Within

White Paper iRMC Remote Scripting and Configuration

Page 4 of 15 www.fujitsu.com/fts/serverview

For SET operations the command sequence needs a <DATA> field which supports the following types to describe the data:

xsd::integer This type describes an integer value. Example: <DATA Type="xsd::integer">1234</DATA>

xsd::hexBinary This type describes a stream of bytes coded in two ASCII characters. The number of bytes used is set using the Len parameter. Example: A stream of four bytes 0x00 0x01 0x02 0x04 will be coded as following ASCII stream: <DATA Type="xsd::hexBinary" Len="4">00010204</DATA>

The data type xsd::hexBinary may be used without any restriction.

xsd::string This data type is normally used for the transfer of strings. For strings the Len parameter is not used (ignored) because the data length is calculated using the string length. For some sensitive data, such as user or service (LDAP/SMTP) access passwords or the AVR license key of the iRMC a Fujitsu proprietary encryption of the data is supported. Password data can be encrypted with the iRMC_PWD.exe program (will be described later on). The encryption is indicated with the Encrypted="1" parameter in the <DATA> tag.

Example: Transfer of the string "Hello World" <DATA Type="xsd::string">Hello World</DATA>

Additionally the string type may be used for IPv4 addresses and MD5 based user passwords. In this case string data are converted internally to the accepted target format. Transfer of an IPv4 address "192.168.1.100" <DATA Type="xsd::string">192.168.1.100</DATA>

Transfer a password as readable text <DATA Type="xsd::string">My Readable Password</DATA>

Transfer an encrypted password <DATA Type="xsd::string" Encrypted="1">TpVlTJwCyHEIsC8tk24ci83JuR9l</DATA>

Attention! The string data type is restricted to readable strings and IP addresses. For all other data you have to use the data type xsd::hexbinary! Note: Please avoid any non US ASCII characters since SCCI and the ConfigSpace interface do not support character encoding (e.g. do not directly specify üöä etc. in strings unless really needed by the application). If you need to specify special characters, please make sure you edit and save your file in UTF-8 format including the correct Byte Order Mark (BOM).

Command Status (STATUS) After the configuration settings are transferred the status contains the result of the operation. If the operation was successfully done the value “0” is returned. Note: This tag is ignored in the iRMC S2 / iRMC S3. A specification for all public configuration settings (ConfigSpace) can be found in the PDF file "SCCI_CS.pdf" – see in the attachments. This file is distributed with the PRIMERGY Scripting Toolkit. After installation of PRIMERGY Scripting Toolkit the specification can be found in the “Manual32” folder.

Page 5: White Paper - iRMC Remote Scripting and …manuals.ts.fujitsu.com/file/12563/wp-svs-irmc-remote...White Paper iRMC Remote Scripting and Configuration Page 2 of 15 Introduction Within

White Paper iRMC Remote Scripting and Configuration

Page 5 of 15 www.fujitsu.com/fts/serverview

Export of Configuration Data from the iRMC

For the purpose of reference configuration based mass installation the iRMC provides the possibility to export most of the actual configuration from its web interface. All generations of iRMC support exporting configuration data from certain areas into a single file, which then can be reused again to duplicate individual iRMC settings. Service personnel can benefit from this in the process of replacing a mainboard and applying the same settings to the replaced board. The export in ServerView format generates an XML formatted file which can be used together with the SCU. The data is exported from the iRMC in particular logical sections, such as networking, user configuration, the AVR license, the installed SSL certificate and private key and all other firmware settings. For configuration data which is not already mapped internally by the firmware to ConfigSpace values, but is accessed from the SCCI API layer as ConfigSpace, the required mapping information is added during generation of the XML file. The resulting file can then be used for applying the settings to different iRMC’s with e.g. ‘scconfig –transfer’ commands or remote configuration commands like cURL for example. The ‘All other Firmware settings’ includes all current ConfigSpace values. During export, the firmware processes the internal data table of known ConfigSpace values step-by-step and exports all of them if not already exported within another section. Since this is not based on a fixed list of known values, but uses the current firmware internal table, new implemented values are automatically exported with newer firmware versions.

Picture 1 - Export of Configuration data from the iRMC in SCCI format

Export of Configuration Data with cURL

The setup for all the following scripts and examples consists of a single client configured in an 192.168.1.0 / 24 network area and a Fujitsu PRIMERGY RX100 S8 rack server with an iRMC S4 using the IP address 192.168.1.100. The firmware version is 8.05F at the moment of the release of this document. The login credentials are the factory default settings (user: admin, password: admin). One can either export configuration data from the iRMC web interface or export the settings via a script. The script can be set to either export all or only particular sections. To do so an own fixed iRMC URL namely: /iRMC_Settings.pre followed by one of the following parameters is available.

?P42=1&SAVE_DATA=1 Include Network Settings

?P43=1&SAVE_DATA=1 Include User Settings

?P44=1&SAVE_DATA=1 Include License Information

?P45=1&SAVE_DATA=1 Include Other Settings

?P46=1&SAVE_DATA=1 Include Certificates

?SAVE_ALL=1 Save all above mentioned settings

Page 6: White Paper - iRMC Remote Scripting and …manuals.ts.fujitsu.com/file/12563/wp-svs-irmc-remote...White Paper iRMC Remote Scripting and Configuration Page 2 of 15 Introduction Within

White Paper iRMC Remote Scripting and Configuration

Page 6 of 15 www.fujitsu.com/fts/serverview

Examples:

Export iRMC’s user settings only via cURL curl –u user:password “http://192.168.1.100/iRMC_Settings.pre?P43=1&SAVE_DATA=1”

Export iRMC’s networksettings and license information via cURL curl –u user:password “http://192.168.1.100/iRMC_Settings.pre?P42=1&P44=1&SAVE_DATA=1”

Export all iRMC settings via cURL curl –u user:password “http://192.168.1.100/iRMC_Settings.pre?SAVE_ALL=1”

Note: The above examples will provide the required iRMC settings directly to your terminal / console and won’t be stored in a separate file.

To achieve this you have to redirect the output of your commands like this:

curl –u user:password

“http://192.168.1.100/iRMC_Settings.pre?SAVE_ALL=1”>>All_Settings.pre

Import of Configuration Data

The export of the configuration is supported since iRMC S1. Starting with iRMC S2 firmware version 5.20A (IPv6 release) the import of XML file also in a “.pre” file format, in SCCI command format is supported. Note: iRMC S1 based systems will not support this feature. The SCCI command file can be sent to the iRMC in 2 different ways: Direct import from the iRMC S2 / S3 / S4 web interface Send to the /config URL of the iRMC via HTTP / HTTPS POST operation

Picture 2 - Import via Web Interface

Page 7: White Paper - iRMC Remote Scripting and …manuals.ts.fujitsu.com/file/12563/wp-svs-irmc-remote...White Paper iRMC Remote Scripting and Configuration Page 2 of 15 Introduction Within

White Paper iRMC Remote Scripting and Configuration

Page 7 of 15 www.fujitsu.com/fts/serverview

Scripted Configuration of the iRMC Family Besides changing the settings of an iRMC it is also possible to execute different actions with immediate effect on the system, so called “SCCI commands”. Since not every iRMC version supports the same commands the following charts give an overview about version specific commands.

Supported SCCI Commands in iRMC S2 / iRMC S3 / iRMC S4

SCCI OpCode

SCCI Command String Description

0xE002 ConfigSpace ConfigSpace Write

0x0111 PowerOnCabinet Power-On the Server

0x0112 PowerOffCabinet Power-Off the Server

0x0113 PowerOffOnCabinet Power Cycle the Server

0x0204 ResetServer Hard Reset the Server

0x020C RaiseNMI Pulse the NMI (Non Maskable Interrupt)

0x0205 RequestShutdownAndOff Graceful Shutdown, requires running Agent

0x0206 RequestShutdownAndReset Graceful Reboot, requires running Agent

0x0209 ShutdownRequestCancelled Cancel a Shutdown Request

0x0203 ResetFirmware Perform a BMC Reset

iRMC S2 / iRMC S3 Specific Commands

SCCI OpCode

SCCI Command String Description

0x0250 ConnectRemoteStorageServer Connect or Disconnect a standalone Remote Storage Server

iRMC S4 Specific Commands

SCCI OpCode

SCCI Command String Description

0x0251 ConnectRemoteFdImage Connect or Disconnect a Floppy Disk image on a Remote Image Mount (NFS or CIFS Share )

0x0252 ConnectRemoteCdImage Connect or Disconnect a CD/DVD .iso image on a Remote Image Mount (NFS or CIFS Share )

0x0253 ConnectRemoteHdImage Connect or Disconnect a Hard Disk image on a Remote Image Mount (NFS or CIFS Share )

Scripting the iRMC’s configuration can be done with different tools or methods, depending on the environment’s needs. In the following some examples will explain possibilities how to upload the XML formatted .pre file to the iRMC in order to edit its settings.

Page 8: White Paper - iRMC Remote Scripting and …manuals.ts.fujitsu.com/file/12563/wp-svs-irmc-remote...White Paper iRMC Remote Scripting and Configuration Page 2 of 15 Introduction Within

White Paper iRMC Remote Scripting and Configuration

Page 8 of 15 www.fujitsu.com/fts/serverview

Scripting with cURL

Curl is an open source command line tool for transferring data specified with URL syntax. The latest version of the source code as well as precompiled versions for different operating systems can be downloaded from http://curl.haxx.se/. The following are some examples of how to send a configuration file with curl to the iRMC, for details of the curl command line options please refer to the curl documentation.

HTTP Access with Basic Authentication (default): curl --basic -u user:password --data @Config.pre http://192.168.1.100/config

HTTP Access with Digest Authentication: curl --digest -u user:password --data @Config.pre http://192.168.1.100/config

HTTPS Access with no certificate check (-k) and Digest authentication: curl --digest -k -u user:password --data @Config.pre https://192.168.1.100/config HTTPS Access with an LDAP user account. Please note, that for LDAP users you have to specify Basic authentication curl --basic -k -u LDAPuser:LDAPpassword --data @Config.pre https://192.168.1.100/config

Generating Encrypted Passwords with iRMC_PWD.exe

When transferring passwords in an encrypted format you may need a tool to encrypt a password for using it within the .pre file. iRMC_PWD.exe is a 32 bit Windows program which can generate encrypted passwords for use with SCCI scripting. It can be used to encrypt a single password, or to generate an SCCI batch file for scripted configuration. It can be downloaded from the Fujitsu Support Portal: http://support.ts.fujitsu.com/Download/Showdescription.asp?ID=1105389&Info=FTS_ID&Lng=COM If you want to generate a .pre file which sets / changes the username to admin and the password to SecretPassword for the existing user with OID 2:

iRMC_PWD -o 2 -u admin -p SecretPassword -b

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<CMDSEQ>

<!-- "ConfBMCAcctUserName" -->

<CMD Context="SCCI" OC="ConfigSpace" OE="1451" OI="2" Type="SET">

<DATA Type="xsd::string">admin</DATA>

<STATUS>0</STATUS>

</CMD>

<!-- "ConfBMCAcctUserPassword" -->

<CMD Context="SCCI" OC="ConfigSpace" OE="1452" OI="2" Type="SET">

<DATA Type="xsd::string" Encrypted="1">N2BZd3oLHAgc11pnHCAV9P/ItwRue4qBB3IU7Xsh</DATA>

<STATUS>0</STATUS>

</CMD>

</CMDSEQ>

Page 9: White Paper - iRMC Remote Scripting and …manuals.ts.fujitsu.com/file/12563/wp-svs-irmc-remote...White Paper iRMC Remote Scripting and Configuration Page 2 of 15 Introduction Within

White Paper iRMC Remote Scripting and Configuration

Page 9 of 15 www.fujitsu.com/fts/serverview

Change BIOS Parameters via iRMC With iRMC S3 a new feature was introduced which allows to backup BIOS parameters to a single file on a local system as you can do it with the iRMC’s settings. The file comes in an XML format like the iRMC settings, thus it can be edited to the environment’s requirements. All the settings which can be found in the downloaded XML file are changeable, but please be aware that not all features which are currently available in the BIOS are also available in the file. These will be part of further updates in the future. Restoring the file, meaning uploading it back to the iRMC again applies the parameters to the BIOS with the next reboot. Note: To request and gather the BIOS parameters from the iRMC’s web interface a boot or reboot of the PRIMERGY system is required.

BIOS Single Parameter Restoration via cURL

The following are examples of how to restore the BIOS single parameters from the XML format file RX2530M1R1_V5.0.0.9_R1.24.0_for_D3279-A1x_20150710.pre, which has been created manually with the iRMC web UI.

HTTP Access with Basic Authentication (default): curl --basic -u user:password --data @” RX2530M1R1_V5.0.0.9_R1.24.0_for_D3279-A1x_20150710.pre” http://192.168.1.100/biosrestore

HTTP Access with Digest Authentication: curl --digest -u user:password --data @”RX2530M1R1_V5.0.0.9_R1.24.0_for_D3279-A1x_20150710.pre” http://192.168.1.100/biosrestore

HTTPS Access with no certificate check (-k) and Digest Authentication: curl --digest -k -u user:password --data @”RX2530M1R1_V5.0.0.9_R1.24.0_for_D3279-A1x_20150710.pre” https://192.168.1.100/biosrestore

Error Checking and Reporting

When a BIOS single parameter restoration request is received through the scripted interface the firmware validates if the request is allowed and does an initial parsing of the restoration data. When an error is detected the firmware returns an XML formatted response string describing the failure. “Another BIOS Backup/Restoration process exists”

This is returned when a restoration cannot be started because a single parameter backup/restoration operation is already in progress

“BIOS Restoration not supported” This is returned when the BSPBR (BIOS Single Parameter Backup / Restore) feature is not supported by a system or in the systems current state.

“BIOS Restoration file not provided” This is returned when a BSPBR restoration is called but no restoration data is provided, for example when an invalid file name is specified.

“Invalid BIOS Restoration file” This is returned when the BSPBR restoration data is not in a recognized XML format.

“Unspecified Error occurred” This is returned for all other errors detected during the processing of the BSPBR restoration request.

Page 10: White Paper - iRMC Remote Scripting and …manuals.ts.fujitsu.com/file/12563/wp-svs-irmc-remote...White Paper iRMC Remote Scripting and Configuration Page 2 of 15 Introduction Within

White Paper iRMC Remote Scripting and Configuration

Page 10 of 15 www.fujitsu.com/fts/serverview

Automatic Power-on After BIOS Single Parameter Restore

This feature will be only available starting with iRMC S4 firmware version 7.51F. Currently, the server is automatically powered-off after the BIOS Single Parameter Restore operation is completed. To provide the user with the opportunity to change this behavior and automatically power-on the server after a restore operation has been completed, a variable “autopon” has been added, which the curl script can set to 1 (enable automatic power-on) or 0 (to keep it disabled). The absence of the additional variable will assume “autopon=0”, which is the current behavior, so existing scripts will not be affected. For an automatic power-on request, the above examples will get extended to:

curl --basic -u user:password --data @”RX2530M1R1_V5.0.0.9_R1.24.0_for_D3279-A1x_20150710.pre” http://192.168.1.100/biosrestore?autopon=1

Remote scripted update of BIOS and iRMC

Updating iRMC Firmware from File

Changes have been made to allow for the iRMC to be flashed via the following script. Systems which do not support these features (iRMC < iRMC S3) will respond with a standard HTTP 404 (not found) response. The fixed URL for the iRMC Update is “/irmcupdate”. A flash selector can be passed as additional parameter and will be changed before the firmware file is checked if the user has specified a flash selector. The flash selector does not have to be passed as parameter on every cURL call. This allows for “flashSelect” and “file” to be used independent of each other as follows. Please note, that all given examples use local iRMC user accounts and Digest authentication (--digest) for security reasons. If you want or need to use an LDAP user account, Digest authentication is not possible and Basic authentication has to be used instead (cURL command line option --basic). For security reasons, it is recommended to use HTTPS together with Basic authentication unless your network environment is secured against physical access.

Flash selector only with Basic authentication and HTTPS and LDAP username/password curl --basic -k -u LDAPuser:LDAPpassword -F “flashSelect=X” https://192.168.1.100/irmcupdate

Flash selector only curl --digest -k -u user:password -F “flashSelect=X” http://192.168.1.100/irmcupdate

Flash selector passed as URL parameter curl --digest -k -u user:password http://a.b.c.d/irmcupdate?flashSelect=X

Sending an iRMC firmware or SDR update file only with –F command line option curl --digest -k -u user:password -F “file=@filename” http://192.168.1.100/irmcupdate

or with a different cURL command line option (--data-binary) curl --digest -k -u user:password --data-binary @filename http://192.168.1.100/irmcupdate

Flash selector and update file together curl --digest -k -u user:password -F “flashSelect=X” -F “file=@filename”

http://192.168.1.100/irmcupdate

or flash selector passed as URL parameter together with –F command line option for the update file: curl --digest -k -u user:password -F “file=@filename“

http://192.168.1.100/irmcupdate?flashSelect=X

or with –data-binary cURL command line option for the update file and flash selector as URL parameter: curl --digest -k -u user:password --data-binary @filename

http://192.168.1.100/irmcupdate?flashSelect=X

Page 11: White Paper - iRMC Remote Scripting and …manuals.ts.fujitsu.com/file/12563/wp-svs-irmc-remote...White Paper iRMC Remote Scripting and Configuration Page 2 of 15 Introduction Within

White Paper iRMC Remote Scripting and Configuration

Page 11 of 15 www.fujitsu.com/fts/serverview

The values for “flashSelect” are passed as numbers and have the following meanings. Other values result in an error and the process is rejected.

Updating BIOS from File

Changes have been made similar to the scripting interface for restoration of BIOS single parameters to allow for the BIOS to be flashed via the following script. The fixed URL for the BIOS Update over the iRMC Web Interface is “/biosupdate” Examples:

curl --digest -k -u user:password -F “file=@biosfile” http://192.168.1.100/biosupdate

or:

curl --digest -k -u user:password --data-binary @biosfile http://192.168.1.100/biosupdate

Checking an iRMC Firmware or BIOS Update Progress

The fixed URL for the progress status of the BIOS Update over the iRMC Web Interface is /biosprogress

curl --digest -k -u user:password http://192.168.1.100/biosprogress

The fixed URL for the progress status of the BIOS Update over the iRMC Web Interface is /irmcprogress

curl --digest -k -u user:password http://192.168.1.100/irmcprogress

Error Checking and Progress Reporting

Depending on the URL context (*update or *progress) response data needs to be interpreted differently even if the returned XML format is structured the same. Access to /irmcupdate or /biosupdate: This part is handled by the regular Web Server page and the Web Server specific error code is returned. The embedded Web Server will perform validation of the required privilege to perform the update, in case of iRMC firmware updates check and verify the data and start the flash process. Additionally in the event that an update cannot be started because one is already in progress, the response will also state the progress of the current update. The value returned maps internally 1:1 to the C style enumeration below. Please note that only a selection of values apply to the scripting interface. Access to /irmcprogress or /biosprogress: This returns the actual status of the flash state machine. Please note, that the numeric values returned overlap with the numeric values from the /irmcupdate or /biosupdate and need different interpretation. The value returned maps internally 1:1 to the C style enumeration below.

Image One (low) 1

Image Two (high) 2

Opposite of the currently running firmware

255

Page 12: White Paper - iRMC Remote Scripting and …manuals.ts.fujitsu.com/file/12563/wp-svs-irmc-remote...White Paper iRMC Remote Scripting and Configuration Page 2 of 15 Introduction Within

White Paper iRMC Remote Scripting and Configuration

Page 12 of 15 www.fujitsu.com/fts/serverview

XML responses will be returned in the following style:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<Status>

<Value>NumericValue</Value>

<Severity>[Information | Warning | Error | Unknown]</Severity>

<Message>Context and NumericValue specific String</Message>

</Status>

Each XML response has got an own value, severity and a related message explaining what the returned information means. Examples: To find out, what the iRMC currently does or what the reason is why the iRMC did not initiate the BIOS update please execute the following command:

curl --digest -k -u user:password https://192.168.1.100/biosprogress

(To get a report for iRMC updates the same command can be used, but “biosprogress” has to be replaced by “irmcprogress”).

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<Status>

<Value> <Severity> <Message>

0 Informational No update in progress

6 Error File not provided

35 Error Feature is not supported on this platform

</Status>

Page 13: White Paper - iRMC Remote Scripting and …manuals.ts.fujitsu.com/file/12563/wp-svs-irmc-remote...White Paper iRMC Remote Scripting and Configuration Page 2 of 15 Introduction Within

White Paper iRMC Remote Scripting and Configuration

Page 13 of 15 www.fujitsu.com/fts/serverview

Sample Scripts In the following chapter you will find a collection of example scripts.

Manually Configure Some Server Information

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<CMDSEQ>

<!-- "ConfCabinetLocation" -->

<CMD Context="SCCI" OC="ConfigSpace" OE="200" OI="0" Type="SET">

<DATA Type="xsd::string">A galaxy far, far away</DATA>

<STATUS>0</STATUS>

</CMD>

<!-- "ConfSystemName" -->

<CMD Context="SCCI" OC="ConfigSpace" OE="201" OI="0" Type="SET">

<DATA Type="xsd::string">R2-D2</DATA>

<STATUS>0</STATUS>

</CMD>

<!-- "ConfSystemDescription" -->

<CMD Context="SCCI" OC="ConfigSpace" OE="203" OI="0" Type="SET">

<DATA Type="xsd::string">An astromech droid</DATA>

<STATUS>0</STATUS>

</CMD>

<!-- "ConfSystemContact" -->

<CMD Context="SCCI" OC="ConfigSpace" OE="204" OI="0" Type="SET">

<DATA Type="xsd::string">Luke Skywalker</DATA>

<STATUS>0</STATUS>

</CMD>

<!-- "ConfServerOperatingSystem" -->

<CMD Context="SCCI" OC="ConfigSpace" OE="20F" OI="0" Type="SET">

<DATA Type="xsd::string">THX 1138</DATA>

<STATUS>0</STATUS>

</CMD>

<!-- "ConfBMCAssetTag" -->

<CMD Context="SCCI" OC="ConfigSpace" OE="210" OI="0" Type="SET">

<DATA Type="xsd::string">R2-D2</DATA>

<STATUS>0</STATUS>

</CMD>

</CMDSEQ>

Power-Off a Managed Server

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<CMDSEQ>

<CMD Context="SCCI" OC="PowerOffCabinet" OE="0" OI="0" Type="SET">

<STATUS>0</STATUS>

</CMD>

</CMDSEQ>

Reset a Managed Server

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<CMDSEQ>

<CMD Context="SCCI" OC="ResetServer" OE="0" OI="0" Type="SET">

<STATUS>0</STATUS>

</CMD>

</CMDSEQ>

Page 14: White Paper - iRMC Remote Scripting and …manuals.ts.fujitsu.com/file/12563/wp-svs-irmc-remote...White Paper iRMC Remote Scripting and Configuration Page 2 of 15 Introduction Within

White Paper iRMC Remote Scripting and Configuration

Page 14 of 15 www.fujitsu.com/fts/serverview

Connecting the iRMC to a Previous Configured Standalone Storage Server address

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<CMDSEQ>

<CMD Context="SCCI" OC="ConnectRemoteStorageServer" OE="0" OI="0" Type="SET">

<DATA Type="xsd::integer">1</DATA>

<STATUS>0</STATUS>

</CMD>

</CMDSEQ>

Note: There are no separate commands for connecting/disconnecting a remote storage connection. The command type is

implicit specified with the DATA tag: 1 is for connecting to, 0 is for disconnecting from a standalone storage server.

Request a Graceful Reboot of the Managed Server

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<CMDSEQ>

<CMD Context="SCCI" OC="RequestShutdownAndReset" OE="0" OI="0" Type="SET">

<STATUS>0</STATUS>

</CMD>

</CMDSEQ>

Note: For this to work it is required to have ServerView Agents installed on the managed server.

Restore the Default SSL Certificate and Private Key

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<CMDSEQ>

<!-- "SSL Private Key" -->

<CMD Context="SCCI" OC="ConfigSpace" OE="1981" OI="0" Type="SET">

<DATA Type="xsd::string">-----BEGIN RSA PRIVATE KEY-----

<Enter iRMC’s private key here>

-----END RSA PRIVATE KEY-----

</DATA>

<STATUS>0</STATUS>

</CMD>

<!-- "SSL Certificate" -->

<CMD Context="SCCI" OC="ConfigSpace" OE="1982" OI="0" Type="SET">

<DATA Type="xsd::string">-----BEGIN CERTIFICATE-----

<Enter iRMC’s SSL certificate here>

-----END CERTIFICATE-----

</DATA>

<STATUS>0</STATUS>

</CMD>

</CMDSEQ>

Page 15: White Paper - iRMC Remote Scripting and …manuals.ts.fujitsu.com/file/12563/wp-svs-irmc-remote...White Paper iRMC Remote Scripting and Configuration Page 2 of 15 Introduction Within

White Paper iRMC Remote Scripting and Configuration

Page 15 of 15 www.fujitsu.com/fts/serverview

Attachments The documentation of the Server Control Command Interface and its according Configuration Space Values can be found here: http://docs.ts.fujitsu.com/dl.aspx?id=9cf271b3-4721-4dd5-83ae-7964ad285f3c

Glossary API Application Programming Interface ASCII American Standard Code for Information Interchange AVR Advanced Video Redirection BIOS Basic Input / Output System BMC Baseboard Management Controller DNS Domain Name System HTTPS HyperText Transfer Protocol Secure IPMI Intelligent Platform Management Interface IPv4 Internet Protocol Version 4 IPv6 Internet Protocol Version 6 iRMC integrated Remote Management Controller LAN Local Area Network LDAP Lightweight Directory Access Protocol NVCFG nonvolatile configuration NVRAM Non-Volatile Random-Access Memory OID Object Identifier PDF Portable Document Format POST Power-On Self-Test SCCI Server Control Command Interface SCU Server Configuration Utility SSL Secure Sockets Layer UI User Interface URL Uniform Resource Locator VLAN Virtual Local Area Network XML Extensible Markup Language

Contact FUJITSU Fujitsu Technology Solutions GmbH Mies-van-der-Rohe-Str. 8 80807 Munich, Germany Website: www.fujitsu.com/fts 2015-12-14 WW EN

Copyright 2015 FUJITSU LIMITED Fujitsu, the Fujitsu logo are trademarks or registered trademarks of Fujitsu Limited in Japan and other countries. ServerView is a registered trademark of Fujitsu Technology Solutions GmbH or its affiliates in Germany and in other countries. Other company, product and service names may be trademarks or registered trademarks of their respective owners. Technical data subject to modification and delivery subject to availability. Any liability that the data and illustrations are complete, actual or correct is excluded. Designations may be trademarks and/or copyrights of the respective manufacturer, the use of which by third parties for their own purposes may infringe the rights of such owner.