0

I'm trying to change the NIC a server boots from using the redfish module in python. The server is a supermicro board:

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

Running

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

yields

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)

Now I want to change this to boot from the 3rd NIC first so I run:

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)"}})

but this results in an error response:

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"]}]}}

Anyone know how to change the boot options via redfish?

1 Answers1

0

Try modifying https://github.com/dell/iDRAC-Redfish-Scripting/blob/master/Redfish%20Python/ChangeBiosBootOrderREDFISH.py

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

I’m doing this from my phone so I haven’t given it a shot but the BIOS options are standard Redfish things so iDRAC and Supermicro’s stuff should be pretty similar here

Grant Curell
  • 279
  • 1
  • 11
  • Unfortunately not: `REDFISH_OBJ.patch("/redfish/v1/Systems/1", body={"Boot": {"BootOrder": ["Boot0004", "Boot0003", "Boot0005", "Boot0006", "Boot0002", "Boot0007", "Boot0008"]}})` gives me a 200 status but when I query the values haven't changed. Does that need a reboot to take effect like the Bios settings? – Goswin von Brederlow Jul 27 '22 at 14:12
  • I can't speak to Supermicro as I'm on all Dell guy but yes - on Dell BIOS changes typically take affect after POST so you do have to reboot. – Grant Curell Jul 27 '22 at 20:20
  • Is there something to see pending changes like /redfish/v1/Systems/1/Bios/SD shows pending settings changes for Bios? I don't see a Settings object in /redfish/v1/Systems/1 – Goswin von Brederlow Jul 28 '22 at 00:54
  • This worked (assuming it needs a reboot, can't test that on a running system) with a BiosVersion 1.1a. The system I now have for testing that I can reboot has BiosVersion 2.1 and now both the BootOptions field for querying the boot order and the "BootOrder" field in "Boot" are missing. Both claim to represent a '@odata.type': '#ComputerSystem.v1_8_0.ComputerSystem' :( – Goswin von Brederlow Jul 28 '22 at 13:03
  • Unfortunately, that field is different for every vendor. On Dell the boot order is under /redfish/v1/Systems/System.Embedded.1/Bios with key Attributes – Grant Curell Jul 28 '22 at 19:53
  • yes and no. The Bios Attributes show the boot order but you can't change them, see the initial question. Trying to set anything to "UEFI Network:..." other than the original string fails. All other values give a 2xx response and appear in the Bios/SD object as pending changes but after reboot nothing is changed. – Goswin von Brederlow Jul 28 '22 at 22:39