H3C案例查看:使用CONREP导出及部署HPE服务器BIOS配置

1. 安装

# rpm -ivh hp-scripting-tools-11.10-2.rhel6.x86_64.rpm

2. 命令格式

conrep [-s | -l] [-x hardware_definition_file] [-f system_configuration_file] [-h]

-s 保存服务器配置到文件

-l 导入配置文件到服务器

-x 选择XML硬件定义文件(默认为conrep.xml)

-f 指定配置文件位置及文件名(不加此参数,默认为当前目录的conrep.dat)

-h 显示帮助

3. 命令返回代码

0 - 命令执行成功

1 - 硬件定义文件(conrep.xml)错误

2 - 配置文件(conrep.dat)错误

3 - 缺少Health Driver

4 - BIOS设置了密码,需要清除

5 - 硬件定义文件不支持此硬件平台

6 - 缺少XML标签

7 - 命令错误或者无效的命令

255 - 其他错误,详细参考报错信息。

4. 导出配置到文件

以ML350 Gen9机型为例,导出配置文件并且保存到/tmp/ML350Gen9BIOS.dat:

# conrep -s -f /tmp/ML350Gen9BIOS.dat

conrep 5.2.0.0 - HPE Scripting Toolkit Configuration Replication Program

(c) Copyright 2013,2017 Hewlett Packard Enterprise Development LP

System Type:                    ProLiant ML350 Gen9
        ROM Date   :                    04/25/2017
        ROM Family :                    P92
        Processor Manufacturer :        Intel(R) Corporation

XML System Configuration: /opt/hp/hp-scripting-tools/etc/conrep.xml

Hardware   Configuration: /tmp/ML350Gen9BIOS.dat
        Global Restriction: [3.40                            ]                  OK

Platform check:
                : [ProLiant DL120 G7   ]        no match
                : [ProLiant ML110 G7   ]        no match
                : [ProLiant DL3        ]        no match
                : [ProLiant ML3        ]        match
                : [ProLiant DL5        ]        no match
                : [ProLiant ML5        ]        no match
                : [ProLiant DL7        ]        no match
                : [ProLiant DL9        ]        no match
                : [ProLiant BL         ]        no match
                : [ProLiant XW         ]        no match
                : [ProLiant WS         ]        no match
                : [ProLiant SE         ]        no match
                : [ProLiant SL4        ]        no match
                : [ProLiant SL3        ]        no match
                : [ProLiant SL2        ]        no match
                : [ProLiant DL160 Gen8 ]        no match
                : [ProLiant SL160 Gen8 ]        no match
                : [ProLiant SL140      ]        no match
                : [ProLiant WS460c Gen8 WS Blade]       no match
                : [ProLiant MicroServer Gen8]   no match
                : [StoreEasy           ]        no match
                : [FlexServer          ]        no match
                : [FlexStorage         ]        no match
                : [3PAR                ]        no match
                : [ProLiant ML10       ]        no match
                : [Gen9                ]        match
                : [ProLiant XL         ]        no match
                : [SE2160w Server      ]        no match
                : [C1030h              ]        no match
                : [UIS                 ]        no match
                : [Apollo              ]        no match
                : [EC200a              ]        no match
                : [TM200               ]        no match

Saving configuration data to /tmp/ML350Gen9BIOS.dat

Conrep Return Code: 0

5. 导入配置文件

# conrep -l -f /tmp/ML350Gen9BIOS.dat

conrep 5.2.0.0 - HPE Scripting Toolkit Configuration Replication Program

(c) Copyright 2013,2017 Hewlett Packard Enterprise Development LP

System Type:                    ProLiant ML350 Gen9
        ROM Date   :                    04/25/2017
        ROM Family :                    P92
        Processor Manufacturer :        Intel(R) Corporation

XML System Configuration: /opt/hp/hp-scripting-tools/etc/conrep.xml

Hardware   Configuration: /tmp/ML350Gen9BIOS.dat
        Global Restriction: [3.40                            ]                  OK

Platform check:
                : [ProLiant DL120 G7   ]        no match
                : [ProLiant ML110 G7   ]        no match
                : [ProLiant DL3        ]        no match
                : [ProLiant ML3        ]        match
                : [ProLiant DL5        ]        no match
                : [ProLiant ML5        ]        no match
                : [ProLiant DL7        ]        no match
                : [ProLiant DL9        ]        no match
                : [ProLiant BL         ]        no match
                : [ProLiant XW         ]        no match
                : [ProLiant WS         ]        no match
                : [ProLiant SE         ]        no match
                : [ProLiant SL4        ]        no match
                : [ProLiant SL3        ]        no match
                : [ProLiant SL2        ]        no match
                : [ProLiant DL160 Gen8 ]        no match
                : [ProLiant SL160 Gen8 ]        no match
                : [ProLiant SL140      ]        no match
                : [ProLiant WS460c Gen8 WS Blade]       no match
                : [ProLiant MicroServer Gen8]   no match
                : [StoreEasy           ]        no match
                : [FlexServer          ]        no match
                : [FlexStorage         ]        no match
                : [3PAR                ]        no match
                : [ProLiant ML10       ]        no match
                : [Gen9                ]        match
                : [ProLiant XL         ]        no match
                : [SE2160w Server      ]        no match
                : [C1030h              ]        no match
                : [UIS                 ]        no match
                : [Apollo              ]        no match
                : [EC200a              ]        no match
                : [TM200               ]        no match

Loading configuration data from /tmp/ML350Gen9BIOS.dat

Conrep Return Code: 0

(0)

相关推荐