如何使用 redfish 更改 BootOption bios 设置?

如何使用 redfish 更改 BootOption bios 设置?

我正在尝试使用 python 中的 redfish 模块更改服务器启动的 NIC。该服务器是一块超微主板:

 Firmware Version   01.00.17
 Firmware Build Time    09/02/2021
 Redfish Version    1.8.0
 BIOS Firmware Version  1.1a

跑步

REDFISH_OBJ.get("/redfish/v1/Systems/1/Bios")

产量

BootOption#1 = UEFI Network:(B23/D0/F0) UEFI PXE IPv4: Intel(R) Ethernet Controller X710 for 10GBASE-T(MAC:3cecef5ef7ba)
BootOption#1$4 = (B23/D0/F0) UEFI PXE IPv4: Intel(R) Ethernet Controller X710 for 10GBASE-T(MAC:3cecef5ef7ba)
BootOption#3$4 = (B23/D0/F2) UEFI PXE IPv4: Intel(R) Ethernet Controller X710 for 10 Gigabit SFP+(MAC:3cecef5ef7bc)

现在我想将其更改为首先从第 3 个 NIC 启动,因此我运行:

REDFISH_OBJ.patch("/redfish/v1/Systems/1/Bios", body={"Attributes": {"BootOption#1": "UEFI Network:(B23/D0/F2) UEFI PXE IPv4: Intel(R) Ethernet Controller X710 for 10 Gigabit SFP+(MAC:3cecef5ef7bc)"}})

但这会导致错误响应:

400
Content-Length 526
OData-Version 4.0, 4.0
Content-Type application/json; charset=UTF-8
Strict-Transport-Security max-age=31536000; includeSubdomains
X-XSS-Protection 1; mode=block
Content-Security-Policy default-src 'self';connect-src 'self' ws: wss:;frame-src 'self';img-src 'self' data:;object-src 'self';font-src 'self' data:;script-src 'self' 'unsafe-inline' 'unsafe-eval';style-src 'self' 'unsafe-inline';worker-src 'self' blob:;
Cache-Control private
X-Frame-Options SAMEORIGIN
X-Content-Type-Options nosniff
Date Tue, 26 Jul 2022 14:00:26 GMT


{"error":{"code":"Base.v1_4_0.GeneralError","Message":"A general error has occurred. See ExtendedInfo for more information.","@Message.ExtendedInfo":[{"MessageId":"Base.1.4.PropertyValueTypeError","Severity":"Warning","Resolution":"Correct the value for the property in the request body and resubmit the request if the operation failed.","Message":"The value null for the property BootOption#1 is of a different type than the property can accept.","MessageArgs":["null","BootOption#1"],"RelatedProperties":["BootOption#1"]}]}}

有人知道如何通过 redfish 更改启动选项吗?

答案1

尝试修改https://github.com/dell/iDRAC-Redfish-Scripting/blob/master/Redfish%20Python/ChangeBiosBootOrderREDFISH.py

前任:ChangeBiosBootOrderREDFISH.py -ip 192.168.0.120 -u root -p calvin --change Boot000A, Boot0002

我是通过手机进行此操作的,所以我还没有尝试过,但 BIOS 选项是标准的 Redfish 东西,所以 iDRAC 和 Supermicro 的东西在这里应该非常相似

相关内容