Scripting Toolkit 4.4 - Tools Documentation

Transcription

Scripting Toolkit 4.4 - Tools Documentation
User Manual - English
FUJITSU Software ServerView Suite
Scripting Toolkit V4.4
Tools Documentation
March 2015 Edition
© Copyright Fujitsu Technology Solutions GmbH 2015
All hardware and software names used are trademarks of their respective manufacturers.
All rights, including rights of translation, reproduction by printing, copying or similar methods,
in part or in whole, are reserved.
Offenders will be liable for damages.
All rights, including rights created by patent grant or registration of a utility model or design,
are reserved.
Delivery subject to availability. Right of technical modification reserved.
Contents
1
Preface.................................................................................................................. 5
2
2.1
2.2
2.3
2.4
Scripting Toolkit ................................................................................................... 6
About This Guide ................................................................................................... 6
Target Audience..................................................................................................... 6
Safety Notes .......................................................................................................... 6
Notational Conventions ......................................................................................... 7
3
3.1
3.1.1
3.1.2
3.2
3.2.1
3.3
3.3.1
Utilities ................................................................................................................. 9
BIOS Configuration .............................................................................................. 10
DeskView DskFlash .............................................................................................. 10
DeskView BiosSet................................................................................................. 14
RAID Configuration .............................................................................................. 17
ServerView RAID Service (amCLI) ......................................................................... 17
System Identification and Management Controller Configuration ........................ 22
SCConfig .............................................................................................................. 22
Tools Documentation
1
Preface
The ServerView Scripting Toolkit is a collection of WinPE-based utilities and sample scripts for
the configuration and installation of PRIMERGY systems.
This document describes all supported WinPE tools for the ServerView Scripting Toolkit. For
information about the ServerView Scripting Toolkit itself please refer to the User Guide.
Tools Documentation
5
2
Scripting Toolkit
2.1
About This Guide
This user guide is intended as a reference for using the ServerView Scripting Toolkit for
deployment of PRIMERGY servers.
2.2
Target Audience
This guide is targeted at experienced administrators who are familiar with the servers of the
PRIMERGY family from Fujitsu Technology Solutions and have a very good knowledge of WinPE.
2.3
Safety Notes
Caution!
Improper use of the toolkit utilities can result in loss of critical data.
Because of the potential risk of data loss, only experienced individuals should use
the toolkit utilities. Before using the toolkit, you must take all necessary precautions
to ensure that mission-critical systems remain online if a failure occurs.
6
Tools Documentation
Scripting Toolkit
2.4
Notational Conventions
The following notational conventions are used in this manual:
Typewriter text
Indicates elements of the syntax that must be entered exactly as
shown in the ’Syntax’ section.
Italics
Indicates variables, arguments or file names
[]
Indicates an optional entry (an option or argument enclosed in
square brackets may be specified), i.e. the entry is not mandatory.
|
Indicates an alternative option (none, one or more of several
options or arguments can be specified).
…
Indicates that one or more options or arguments can be specified
several times.
Bold
Used for highlighting in the text.
"Quotes"
Indicates cross-references to other chapters or manuals.
Warning sign indicating that your health, the correct functioning
of your system, or the security of your data may be at risk if you
ignore the information given at this point.
Indicates additional information, notes and hints.
Tools Documentation
7
Utilities
3
This chapter describes the WinPE utilities provided with this toolkit and how to make use of the
utilities in a scripting environment for server deployment.
These utilities are distributed with the ServerView Scripting Toolkit for both x86 and x64 WinPE:
BIOS configuration

DeskView DeskFlash

DeskView BiosSet
RAID configuration

ServerView RAID (amCLI)
System identification and management controller configuration

SCConfig

ServerControl Service
Tools Documentation
9
Utilities
3.1
BIOS Configuration
3.1.1 DeskView DskFlash
DeskView is a set of command line based BIOS management utilities. These utilities can be
used for all PRIMERGY systems that are supported by the integration pack.
DeskView DskFlash is a command line based BIOS management utility. This utility can be used
for all PRIMERGY systems that are supported by the toolkit. DeskView DskFlash can be used to
save the BIOS configuration of a PRIMERGY reference system and to apply the same
configuration to a PRIMERGY target system.
In the context of PRIMERGY server deployment, this utility is primarily used to change the boot
sequence of the target PRIMERGY system during the configuration and installation process.
3.1.1.1 DeskView DskFlash Syntax
DskFlash argument [argument ...]
3.1.1.2 DeskView DskFlash Usage
The following outline focuses on the save and restore mechanisms for server deployment. Only
the features described in the Utility Usage and Arguments sections are supported with this
release of the ServerView Scripting Toolkit.
Capture an existing BIOS configuration and store it in a configuration file:
DskFlash /ar /wd=<path> /ov /lf=<logfile> /o=<BIOSfile>
Restore a BIOS configuration from a configuration file:
DskFlash /upd /wd=<path> /ov /nrb /lf=<logfile> /o=<BIOSfile>
10
Tools Documentation
Utilities
3.1.1.3 DeskView DskFlash Arguments
Argument
Description
/ar
Save the BIOS configuration to a configuration file.
Note: Use the ’/ov’ option to overwrite the configuration file in silent
mode.
/upd
Restore the BIOS from a file.
If the required file is not present in the actual working directory, or if the
information in the file does not match the board or BIOS version,
DskFlash will return error code ’2’.
Note: Use the ’/ov’ option to overwrite the BIOS configuration in any
case.
/nrb
Prohibit reboot: the DskFlash kernel may not reboot the system.
/ov
Force overwrite of either the configuration file or the BIOS settings.
/wd=<path>
Specify the working directory.
/o=<BIOSfile>
Name of file to be saved or restored
/lf=<logfile>]
Log actions to file, logfile name optional.
/?
Display help screen.
<no_argument>
Error.
All arguments are case-insensitive.
Tools Documentation
11
Utilities
3.1.1.4 DeskView DskFlash Return Values
Environment variables: None.
Error Code
Description
0
Command completed successfully.
1
Command completed, but log file contains warnings.
2
General error.
4
Syntax error.
8
On one or more target systems, the temporary directory is either missing or
does not have enough free space.
16
On the administrator PC, the temporary directory is either missing or does not
have enough free space.
32
The target system cannot be reached.
64
On one or more target systems, there is no valid file available for updating
the BIOS.
3.1.1.5 DeskView DskFlash Configuration File
The configuration file of the DeskView DskFlash utility contains information on the board and
BIOS and the contents of the NVRAM. It is binary-coded and has the extension ’.BUP’.
Editing and manipulation of the configuration file is strongly discouraged!
3.1.1.6 DeskView DskFlash Important Notes
After restoring a BIOS using DeskView DeskFlash, a reboot is required for the restored BIOS code
to take effect.
3.1.1.7 DeskView DskFlash Deployment Usage
DeskView DskFlash can be used:

12
To configure the BIOS settings of a PRIMERGY target system according to the BIOS settings
of a PRIMERGY reference system.
Tools Documentation
Utilities

To change the BIOS boot sequence of the PRIMERGY target system during server
deployment.
To change the BIOS boot sequence, configure the reference server's BIOS with various boot
priority settings and create a configuration file for each of these settings. Make sure you name
these different BIOS configuration files accordingly.
Step 1:
Save BIOS configurations of a reference system.
Example:
DskFlash /ar /wd=U:\HW_PROF\TX300S7 /ov
/lf=BIOSsavelog.xml /o=SysBios.bup
Step 2:
Configure new BIOS (configuration) of a target system.
Example:
DskFlash /ar /wd=U:\HW_PROF\TX300S7 /s /w /ov /arb
/lf=BIOSrestorelog.xml /o=SysBios.bup
Step 3:
Reboot target system.
A cold reboot is required now.
Tools Documentation
13
Utilities
3.1.2 DeskView BiosSet
DeskView is a set of command line based BIOS management utilities. These utilities can be
used for all PRIMERGY systems that are supported by the integration pack.
DeskView BiosSet is a command line based BIOS management utility. This utility can be used
for all PRIMERGY systems that are supported by the toolkit. DeskView BiosSet can be used to set
or change various BIOS parameters on a PRIMERGY server.
In the context of PRIMERGY server deployment, this utility is primarily used to change the BIOS
password of a PRIMERGY server during the configuration and installation process.
3.1.2.1 DeskView BiosSet Syntax
DskFlash argument [argument ...]
3.1.2.2 DeskView BiosSet Usage
The following outline focuses setting the boot order and BIOS password during server
deployment. Only the features described in the Utility Usage and Arguments sections are
supported with this release of the ServerView Scripting Toolkit.
Change the BIOS password:
BiosSet /PWD=<password> /NEWPWD=<password>
3.1.2.3 DeskView BiosSet Arguments
Argument
Description
/DEFAULT
The order of the devices at system startup (/BOOTORDER parameter) can
only be changed again after the next reboot.
WARNING: If the AHCI has been changed, the computer can possibly no
longer be booted with the parameter /DEFAULT. If this is the case, make
sure that Windows has the correct drivers available.
/E
Display return values and their corresponding descriptions.
/NEWPWD
Set a new password.
/PWD
Provide current password.
14
Tools Documentation
Utilities
/Q
Run in ‘quiet’ mode.
/lf=<logfile>]
Log actions to file, logfile name optional.
-?
Display help screen.
<no_argument>
Error.
All arguments are case-insensitive.
3.1.2.4 DeskView BiosSet Return Values
Environment variables: None.
Error Code
Description
0
Command completed successfully.
1
General error.
2
Syntax error.
3
Access to BIOS Setup denied (either wrong password, SmartCard protected or
MemoryBird protected).
5
BIOS Setup is locked by another application.
6
BiosSet needs a reboot. BIOS has been flashed since last reboot.
7
The BIOS access run module can not be loaded.
8
The new BIOS Setup password is invalid. Either wrong charactes are used or
invalid number of characters.
9
Hardware not supported.
10
The boot option 'Remote Network' was requested in the boot sequence which
is not supported by the BIOS Setup settings.
12
At least one token is not supported by the client.
14
Reset to BIOS default settings failed.
17
At least one boot device from the boot order is not supported.
18
At least one boot priority from the boot order is not supported.
21
An interface which BiosSet needs, is not available.
23
Intel TxT is activated, BiosSet is not allowed to change FlashWrite.
Tools Documentation
15
Utilities
24
BitLocker is activated, BiosSet is not allowed to change anything.
99
Unknown error.
300
DeskView Client is installed. Add the /useinstalled parameter to use the
installed version.
301
Computer needs to be restarted before BiosSet can run.
302
An instance of 'DeskView Instant' is already running. Try again later.
303
An incompatible application is currently running. Try again later.
304
BiosSet cannot run on a Computer with DeskView 5 installed.
305
Unsupported operating system.
306
Insufficient privileges.
3.1.2.5 DeskView BiosSet Deployment Usage
DeskView BiosSet can be used:

To change the BIOS boot password of a PRIMERGY server.
Example: Set a new BIOS password.
BiosSet /NEWPWD=MyNewBiosPassword /PWD=MyOldBiosPassword /Q
A cold reboot is required now.
16
Tools Documentation
Utilities
3.2
RAID Configuration
3.2.1 ServerView RAID Service (amCLI)
ServerView RAID is a universal RAID management tool from Fujitsu Technology Solutions which
supports all RAID controllers within PRIMERGY servers. Refer to ServerView Scripting Toolkit
WinPE Documentation Chapter 5 for information on supported controllers.
ServerView RAID for WinPE within the ServerView Scripting Toolkit is distributed as a selfextracting executable. To be used within WinPE WinPE’s internal ram disk needs to be
extended to at least 64 MB (using WinPECacheThreshold of the File Based Write Filter).
amCLI is a command-line-based RAID controller management utility which hooks into
ServerView RAID. To use amCLI the basic ServerView RAID service (amService.exe) needs to be
running. Some LSI controllers also need the SpySer service running.
amCLI can be used to configure array controllers in a PRIMERGY system.
3.2.1.1 Syntax
amCLI <no_argument>
amCLI <command> <ObjectID> <parameters>
3.2.1.2 Utility Usage
Only the features described in the Utility Usage and Arguments section are supported with this
release of the ServerView Scripting Toolkit.
Tools Documentation
17
Utilities
3.2.1.3 Arguments
Argument
Description
-w <ObjectID>
<FileName>
Write configuration to specified file.
-r <FileName>
Read configuration from specified file and configure system
accordingly.
-c <AdapterID>
raid=<level>
<DriveID> …
Create a RAID array.
Note:
ObjectID “21/3” refers to the whole system. To save the
configuration of a specific controller, use “amCLI –l” to find out the
controller’s ObjectID. The ObjectID depends on the system’s
configuration and may change when the configuration changes.
<AdapterID>: the ObjectID of the controller where the array is to be
created.
<level>: the desired raid level
<DriveID>: the ObjectIDs of the drives for the array
Note:
“amCLI -? exec <AdapterID>” informes about the controller’s array
abilities.
-Z
Clear controller configuration.
-l
List current configuration
-u <User> -p
<Password>
ServerView RAID needs Administrator rights. Add user account data
if current user has no administration rights.
-e <AdapterID
scan_configuration
Force the controller to scan the current configuration and to report
the configuration to ServerView RAID service
<AdapterID>: the ObjectID of the controller
-?
Display help screen.
<no_argument>
Display help screen.
Only the features listed above have been tested and are supported with this release of the
Scripting Toolkit.
All arguments are case-sensitive.
18
Tools Documentation
Utilities
3.2.1.4 Return Values
Environment variables: None.
Error Code
Description
0
Command completed successfully.
1
An internal error occurred.
2
The syntax of the command was invalid.
3
An invalid object was addressed.
4
Internal memory allocation failed
5
Operation not supported by object
6
Property not supported by object
7
Operation cannot be executed at this time.
8
Communication with core service failed.
9
No access to SVRAID database
10
SVRAID database did not initialise correctly
11
SVRAID database corrupt
12
Command failed
13
Invalid data specified for command
14
Login failed
15
No administration rights granted.
16
Could not open file
17
Could not read file
18
Could not write file
Tools Documentation
19
Utilities
3.2.1.5 Important Notes
Controllers which are to be managed with ServerView RAID need to either be RAID controllers or
be configured as RAID controllers. In save/restore mode ServerView RAID always analyses the
complete system and does not complain if no RAID controller is found.
amCLI requires the ServerView RAID service (amService) to be running. It needs to be started
and to initialise (this may take a few minutes with big systems) before amCLI can be used.
The ServerView RAID service relies on events to be notified of changes within the controller
configuration. With WinPE there is no event handling. To make sure the service always ‘sees’
the correct controller configuration it is recommended to force the controller to scan and
update the configuration to the service.
This can be done with the command: amCLI -e <ObjectID> scan_configuration
ServerView RAID needs administrator rights. Add user account data (options –u –p) if current
user has no administration rights. When amCLI is used with WinPE in most cases a user with
Administration rights needs to be created.
Step 1:
Create a WinPE user (ignore errors).
Example:
net user STK stk /add 2>NUL
Step 2:
Add new user to Administrators.
Example:
net localgroup Administrators STK /add 2>NUL
20
Tools Documentation
Utilities
3.2.1.6 Deployment Usage
You can use amCLI to clear and re-configure all controllers in a system:
Step 1:
Start the Service.
Example:
sc create SVRAID DisplayName= SVRAID BinPath=
U:\TOOLS32\SVRAID\amService.exe
Step 2:
Configure the controller.
Example:
amCLI -r svraid.xml
Step 3: Reboot target system.
A cold reboot is required now.
Tools Documentation
21
Utilities
3.3
System Identification and Management
Controller Configuration
3.3.1 SCConfig
The ServerControl Service is a universal system management tool which supports all of Fujitsu
PRIMERGY servers. Refer to ServerView Scripting Toolkit documentation chapter 5 for
information on supported systems.
SCConfig is a command-line-based system management utility which hooks into the
ServerControl Service. To use SCConfig the ServerControl service (svrctrl.exe) needs to be
running. The ServerControl Service is started automatically within ServerView Installation
Manager’s WinPE.
SCConfig can be used configure PRIMERGY servers.
3.3.1.1 Syntax
SCConfig –transfer <filename>
3.3.1.2 Arguments
Argument
Description
-transfer <filename>
Pass a XML-file with commands to execute to SCConfig.
No other arguments are supported.
22
Tools Documentation
Utilities
3.3.1.3 Return Values
Environment variables: None.
Error Code
Description
0
Success.
1
Error.
See the command file <filename> for individual command errors.
3.3.1.4 Important Notes
SCConfig requires the ServerControl service (svrctrl.exe) to be running. It needs to be started
before SCConfig can be used.
Step 1:
Start ServerControl Service.
Example:
svrvtrl.exe /RegImage
3.3.1.5 Command File
SCConfig uses a command file which is both used to specify the command for the ServerControl
Service and to report back the individual command results. To keep the original command file
unchanged, it is recommended to use a copy of the command file for the actual command
execution.
The command file needs to be clean XML and consists of various commands which get
transferred and executed one by one.
The individual commands in the command file need to be setup as follows:
<!— {comment} -->
<CMD Context="SCCI" OC="ConfigSpace" OE="{CSV}" OI="{OI}"
Type="SET" MID="81">
<DATA Type="{DataType}" Len="{Len}">{Data}</DATA>
<STATUS></STATUS>
</CMD>
Where
{comment}
any comment
Tools Documentation
23
Utilities
{CSV}
a ConfigSpace Variable. See scci_cs.pdf in the “Manual32” folder for details
on ConfigSpace Variables.
{OI}
the Object ID. Usually 0 since most Variables only have one instance.
Needs to be set to the correct and corresponding value when addressing
user-related variables.
{DataType}
the data type. Data can be supplied as xsd::hexBinary or xsd::string.
{Len}
the length in bytes of the supplied data. Optional when using xsd::string
{Data}
are the supplied data
After command completion the result of the individual commands is written to
<STATUS></STATUS>.
Status Return Code
Description
0x00
CM_STAT_SUCCESS.
0x01
CM_STAT_INVALID_CMD
0x02
CM_STAT_INVALID_OBJ
0x03
CM_STAT_DEVICE_NOT_EXIST
0x04
CM_STAT_INVALID_SET_VALUE
0x05
CM_STAT_DEVICE_BUSY
0x06
CM_STAT_EXEC_FAILED
0x07
CM_STAT_OBJ_READONLY
0x08
CM_STAT_OBJ_WRITE_PROTECT
0x09
CM_STAT_INTERFACE_CORRUPT
0x0A
CM_STAT_SET_STRING_TOOLONG
0x0B
CM_STAT_SET_COUNT_WRONG
0x0C
CM_STAT_NO_MORE_REPLIES
0x0D
CM_STAT_ACCESS_VIOLATION
0x0E
CM_STAT_FRAME_ALLOC_ERROR
0x0F
CM_STAT_DEVICE_NOT_RESPONDING
0x10
CM_STAT_CHECKSUM_ERROR
24
Tools Documentation
Utilities
0x11
CM_STAT_OUT_OF_MEMORY
0x12
CM_STAT_ILLEGAL_NR_ARGS
0x13
CM_STAT_NO_DATA
0x14
CM_STAT_INVALID_CABINET_NUMBER
0x15
CM_STAT_MORE_REPLIES_FOLLOWING
0x16
CM_STAT_REQUEST_PENDING
0x17
CM_STAT_CMD_HEADER_INCOMPLETE
0x18
CM_STAT_ACCESS_DENIED
Tools Documentation
25