dell / iDRAC-Redfish-Scripting

Python and PowerShell scripting for Dell EMC PowerEdge iDRAC REST API with DMTF Redfish
GNU General Public License v2.0
600 stars 278 forks source link

Unable to change boot order using ImportSystemConfigurationLocalFilenameREDFISH.py #186

Closed stranger12345678 closed 2 years ago

stranger12345678 commented 2 years ago

I am unable to change the boot order using ImportSystemConfigurationLocalFilenameREDFISH.py with this setting: <Attribute Name="SetBootOrderEn">AHCI.Slot.7-2,NIC.PxeDevice.1-1,NIC.PxeDevice.2-1</Attribute>

Output says change is successful, but it's not. Not sure if its an issue with Redfish API because I am unable to change via iDRAC UI BIOS setting as well After clicking apply with reboot, it goes for reboot and we can see the BIOS change window with progress bar. But the setting remains unchanged

python ImportSystemConfigurationLocalFilenameREDFISH.py $args -t ALL -f Settings.xml

Severity: OK Status: Success @odata.type: #DellManager.v1_0_0.ServerConfigurationProfileResults DisplayValue: SetBootOrderEn Name: SetBootOrderEn OldValue: NIC.PxeDevice.1-1,NIC.PxeDevice.2-1,AHCI.Slot.7-2 NewValue: AHCI.Slot.7-2,NIC.PxeDevice.1-1,NIC.PxeDevice.2-1

Message: Successfully imported and applied Server Configuration Profile. MessageId: SYS053 MessageArgs: [] MessageArgs@odata.count: 0


python GetBiosBootOrderBootSourceStateREDFISH.py $args

Index: 0 Enabled: true Id: BIOS.Setup.1-1#UefiBootSeq#NIC.PxeDevice.1-1#709c0888d3f7fb4aa12e13c31f22ef1b Name: NIC.PxeDevice.1-1

Index: 1 Enabled: true Id: BIOS.Setup.1-1#UefiBootSeq#NIC.PxeDevice.2-1#01edff5414046621518e8dfe71a66fec Name: NIC.PxeDevice.2-1

Index: 2 Enabled: true Id: BIOS.Setup.1-1#UefiBootSeq#AHCI.Slot.7-2#3931e0bc8f3a5559fd4d8928d7f0e597 Name: AHCI.Slot.7-2


I am able to change boot order via ChangeBootOrderBootSourceStateREDFISH.py after modifying boot_devices.txt

texroemer commented 2 years ago

Hi @stranger12345678

Attribute "SetBootOrderEn" is used for enabling boot order devices. If you want to change the boot order, there are 2 ways to do this using SCP file, either SetBootOrderFqdd attributes or UefiBootSeq attribute. Please refer the SCP reference doc (section 10.3) for more details on these attributes.

https://downloads.dell.com/Manuals/Common/dellemc-server-config-profile-refguide.pdf

Example below shows using UefiBootSeq attribute where i set Disk.bay.6 as first device in the boot order.

C:\Python39>GetBiosBootOrderBootSourceStateREDFISH.py -ip 192.168.0.120 -u root -p calvin

- Current boot mode is Uefi
- Current boot order devices and their boot source state:

**Enabled: true
Id: BIOS.Setup.1-1#UefiBootSeq#AHCI.Slot.1-2#22786d4659a164626db3ac0b8bfdd87a
Index: 0
Name: AHCI.Slot.1-2**

Enabled: true
Id: BIOS.Setup.1-1#UefiBootSeq#Disk.Bay.6:Enclosure.Internal.0-1#36518476d1223f1ae0ff8e10bf7314f9
Index: 1
Name: Disk.Bay.6:Enclosure.Internal.0-1

Enabled: true
Id: BIOS.Setup.1-1#UefiBootSeq#NIC.PxeDevice.1-1#709c0888d3f7fb4aa12e13c31f22ef1b
Index: 2
Name: NIC.PxeDevice.1-1

Enabled: true
Id: BIOS.Setup.1-1#UefiBootSeq#NIC.PxeDevice.2-1#2e712598c9026124d4281c05246fb04a
Index: 3
Name: NIC.PxeDevice.2-1

Enabled: true
Id: BIOS.Setup.1-1#UefiBootSeq#NIC.PxeDevice.3-1#63be0edf48cc6096aa4a7f5bbe306ab1
Index: 4
Name: NIC.PxeDevice.3-1

Enabled: true
Id: BIOS.Setup.1-1#UefiBootSeq#NIC.PxeDevice.4-1#a19484781c76e60edadc50db4130aa90
Index: 5
Name: NIC.PxeDevice.4-1

- Boot source devices are also copied to "boot_devices.txt" file. If executing script to enable / disable multiple boot sources, this file will be used.

C:\Python39>ImportSystemConfigurationLocalFilenameREDFISH.py -ip 192.168.0.120 -u root -p calvin -t BIOS -s Forced -f 2021-10-11_11518_export.xml

- PASS, JID_339612415288 successfully created for ImportSystemConfiguration method

- INFO, job not completed, current status: "Waiting for the system to shut down.", percent complete: "20"
- INFO, job not completed, current status: "Applying configuration changes.", percent complete: "20"
- INFO, job not completed, current status: "The configuration operation for the specified device is in progress.", percent complete: "40"
- INFO, job not completed, current status: "The component configuration update on the host system is complete", percent complete: "90"
- PASS, job ID JID_339612415288 successfully marked completed

- Detailed configuration changes and job results for "JID_339612415288"

Message: The component configuration update on the host system is complete
MessageArgs: []
MessageArgs@odata.count: 0
MessageId: IDRAC.2.5.SYS032

- JID_339612415288 completed in: 0:06:49

C:\Python39>GetBiosBootOrderBootSourceStateREDFISH.py -ip 192.168.0.120 -u root -p calvin

- Current boot mode is Uefi
- Current boot order devices and their boot source state:

**Enabled: true
Id: BIOS.Setup.1-1#UefiBootSeq#Disk.Bay.6:Enclosure.Internal.0-1#36518476d1223f1ae0ff8e10bf7314f9
Index: 0
Name: Disk.Bay.6:Enclosure.Internal.0-1**

Enabled: true
Id: BIOS.Setup.1-1#UefiBootSeq#AHCI.Slot.1-2#22786d4659a164626db3ac0b8bfdd87a
Index: 1
Name: AHCI.Slot.1-2

Enabled: true
Id: BIOS.Setup.1-1#UefiBootSeq#NIC.PxeDevice.1-1#709c0888d3f7fb4aa12e13c31f22ef1b
Index: 2
Name: NIC.PxeDevice.1-1

Enabled: true
Id: BIOS.Setup.1-1#UefiBootSeq#NIC.PxeDevice.2-1#2e712598c9026124d4281c05246fb04a
Index: 3
Name: NIC.PxeDevice.2-1

Enabled: true
Id: BIOS.Setup.1-1#UefiBootSeq#NIC.PxeDevice.3-1#63be0edf48cc6096aa4a7f5bbe306ab1
Index: 4
Name: NIC.PxeDevice.3-1

Enabled: true
Id: BIOS.Setup.1-1#UefiBootSeq#NIC.PxeDevice.4-1#a19484781c76e60edadc50db4130aa90
Index: 5
Name: NIC.PxeDevice.4-1

- Boot source devices are also copied to "boot_devices.txt" file. If executing script to enable / disable multiple boot sources, this file will be used.