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

API or away to upgrade firmware on FC630 or any model - for idrac7 and above #118

Closed shaikk-arch closed 4 years ago

shaikk-arch commented 4 years ago

Hello texroemer,

I am not sure if i can comment here or not - but i have a QQ

Is there an API or a way to upgrade Firmware through command line for model - FC630 ? idrac7 or any model I am working to develop a tool using python to upgrade BIOS and Firmware - I am trying to find a way how can i upgrade for FC630 model using command line. Tried on Ubuntu and OEL OS- but it is failing “Unable to verify update package signature”. Could you or some one can help me here ?and tell me which is a correct compatible OS i can work on and steps to follow ?

Thanks, Shaik

texroemer commented 4 years ago

Hi @shaikk-arch

Per Dell support site, both the operating systems you stated are not listed as supported.

https://www.dell.com/support/home/en-us/product-support/product/poweredge-fc630/drivers

Have you tried to use python script DeviceFirmwareSimpleUpdateREDFISH.py to update the firmware? This script is supported on iDRAC 7/8 which allows you update any device the iDRAC supports.

Thanks

shaikk-arch commented 4 years ago

Hi @texroemer Thanks for responding , will the python script works for all models ?? like FC630 and R630 to upgrade iLO firmware and Bios firmware ?also on iDrac 7/8 ? I saw some where redfish API's are not supported to idrac 7 ?

I was really trying to upgrade using racadm command

racadm ip -u<> -p<> which is failing saying “Unable to verify update package signature” error

Thanks

texroemer commented 4 years ago

All Python scripts posted on GitHub might not be supported on iDRAC 7/8. Mainly the OEM extension scripts are not supported but all DMTF scripts should work on iDRAC 7/8 and the update script i mentioned is supported.

If using RACADM, use the "update" command with Windows Dell Update Package (DUP) to update the device. See examples below where i updated iDRAC and BIOS on R730. For devices that get applied immediately or need a reboot, refer to Lifecycle Controller user guide update section.

C:\Python38-32>racadm -r 192.168.0.120 -u root -p calvin --nocertwarn update -f iDRAC-with-Lifecycle-Controller_Firmware_KRCXX_WN64_2.75.75.75_A00.EXE
        The Copying Operation has begun,
        This might take several minutes to complete, depending on the network.
        Do not interrupt the operation.
RAC987: Firmware update job for iDRAC-with-Lifecycle-Controller_Firmware_KRCXX_WN64_2.75.75.75_A00.EXE is initiated.
This firmware update job may take several minutes to complete depending on the
component or firmware being updated. To view the progress of the job, use the
"racadm jobqueue view" command. If the job is scheduled, the system will require a manual reboot.
To reboot the system  manually, use the "racadm serveraction powercycle" command.

C:\Python38-32>racadm -r 192.168.0.120 -u root -p calvin --nocertwarn jobqueue view
-------------------------JOB QUEUE------------------------
[Job ID=JID_953485790667]
Job Name=Configure: RAID.Integrated.1-1
Status=Completed
Start Time=[Now]
Expiration Time=[Not Applicable]
Message=[PR19: Job completed successfully.]
Percent Complete=[100]
----------------------------------------------------------
[Job ID=JID_954213614282]
Job Name=Firmware Update: iDRAC with Lifecycle Controller
Status=Completed
Start Time=[Not Applicable]
Expiration Time=[Not Applicable]
Message=[RED001: Job completed successfully.]
Percent Complete=[100]
----------------------------------------------------------

C:\Python38-32>racadm -r 192.168.0.120 -u root -p calvin --nocertwarn update -f BIOS_7YNRC_WN64_2.11.0.EXE --reboot
        The Copying Operation has begun,
        This might take several minutes to complete, depending on the network.
        Do not interrupt the operation.
RAC1172: Firmware update job for BIOS_7YNRC_WN64_2.11.0.EXE is initiated.
This firmware update job may take several minutes to complete depending on the
component or firmware being updated. To view the progress of the job, use the
"racadm jobqueue view" command. After the job is scheduled, the system will automatically reboot.

C:\Python38-32>racadm -r 192.168.0.120 -u root -p calvin --nocertwarn jobqueue view
-------------------------JOB QUEUE------------------------
[Job ID=JID_953485790667]
Job Name=Configure: RAID.Integrated.1-1
Status=Completed
Start Time=[Now]
Expiration Time=[Not Applicable]
Message=[PR19: Job completed successfully.]
Percent Complete=[100]
----------------------------------------------------------
[Job ID=JID_954213614282]
Job Name=Firmware Update: iDRAC with Lifecycle Controller
Status=Completed
Start Time=[Not Applicable]
Expiration Time=[Not Applicable]
Message=[RED001: Job completed successfully.]
Percent Complete=[100]
----------------------------------------------------------
[Job ID=JID_954227683523]
Job Name=Firmware Update: BIOS
Status=Completed
Start Time=[Now]
Expiration Time=[Not Applicable]
Message=[PR19: The specified job has completed successfully.]
Percent Complete=[100]
----------------------------------------------------------
[Job ID=RID_954227847502]
Job Name=Reboot: Graceful OS shutdown with powercycle on timeout
Status=Reboot Completed
Start Time=[Now]
Expiration Time=[Not Applicable]
Message=[RED030: Reboot is complete.]
Percent Complete=[100]
----------------------------------------------------------
shaikk-arch commented 4 years ago

racadm -r 10.15.234.107 -u console -p<> --nocertwarn update -f iDRAC-with-Lifecycle-Controller_Firmware_KRCXX_WN32_2.75.75.75_A00.EXE The Copying Operation has begun, This might take several minutes to complete, depending on the network. Do not interrupt the operation. RAC987: Firmware update job for iDRAC-with-Lifecycle-Controller_Firmware_KRCXX_WN32_2.75.75.75_A00.EXE is initiated. This firmware update job may take several minutes to complete depending on the component or firmware being updated. To view the progress of the job, use the "racadm jobqueue view" command. If the job is scheduled, the system will require a manual reboot. To reboot the system manually, use the "racadm serveraction powercycle" command.

racadm -r 10.15.234.107 -u console -p <> --nocertwarn jobqueue view -------------------------JOB QUEUE------------------------ [Job ID=JID_954667719598] Job Name=Firmware Update: iDRAC Status=Failed Start Time=[Not Applicable] Expiration Time=[Not Applicable] Message=[RED007: Unable to verify Update Package signature.] Percent Complete=[NA]

Screen Shot 2020-07-22 at 12 18 57 PM

It fails - "Unable to verify Update Package signature" do you know why ? i am trying this command from OEL vm

texroemer commented 4 years ago

Can you try 64 bit Windows DUP?

https://dl.dell.com/FOLDER06305188M/1/iDRAC-with-Lifecycle-Controller_Firmware_KRCXX_WN64_2.75.75.75_A00.EXE

shaikk-arch commented 4 years ago

I have installed - DellEMC-iDRACTools-Web-LX-9.4.0-3732_A00.tar.gz

the above links downloads iDrac 2.75 ilo firmware file - this is the one i am trying to upgrade it already

shaikk-arch commented 4 years ago

got you - the file i have is Win 32 bit - let me try with 64 bit

shaikk-arch commented 4 years ago

racadm -r 10.15.234.107 -u console -p <> --nocertwarn update -f iDRAC-with-Lifecycle-Controller_Firmware_KRCXX_WN64_2.75.75.75_A00.EXE The Copying Operation has begun, This might take several minutes to complete, depending on the network. Do not interrupt the operation. ERROR: RAC989: Unable to apply the iDRAC-with-Lifecycle-Controller_Firmware_KRCXX_WN64_2.75.75.75_A00.EXE firmware update. The file used for the operation is invalid. For the list of supported files, use "racadm help update". For the correct version of the file specific to the system, contact the service provider.

texroemer commented 4 years ago

I setup an Oracle VM, was able to update the FW with no issues. Can you let me know what is your current iDRAC version? If really old, you might need to update to a certain version first before going to latest.

[root@localhost bin]# ./idracadm7 -r 10.10.1.10 -u root -p calvin --nocertwarn getvers ion Bios Version = 2.9.1

iDRAC Version = 2.63.60.61

Lifecycle Controller Version = 2.63.60.61

IDSDM Version = NA

[root@localhost bin]# ./idracadm7 -r 10.10.1.10 -u root -p calvin --nocertwarn update -f iDRAC-with-Lifecycle-Controller_Firmware_KRCXX_WN64_2.75.75.75_A00.EXE The Copying Operation has begun, This might take several minutes to complete, depending on the network. Do not interrupt the operation. RAC987: Firmware update job for iDRAC-with-Lifecycle-Controller_Firmware_KRCXX_WN64_2.75.75.75_A00.EXE is initiated. This firmware update job may take several minutes to complete depending on the component or firmware being updated. To view the progress of the job, use the "racadm jobqueue view" command. If the job is scheduled, the system will require a manual reboot. To reboot the system manually, use the "racadm serveraction powercycle" command.

shaikk-arch commented 4 years ago

I am trying to upgrade idrac version 2.70 and 2.75 - the current version it has is 2.60 , i still dont see any progress while upgrading for some reason using RACADM command.

Also, Trying now with Redfish API i see the file is downloaded 100% but i don't see the version upgraded to the latest it is still showing the old

Screen Shot 2020-07-19 at 11 02 06 PM Screen Shot 2020-07-27 at 10 47 42 AM

Any thoughts on this?

Thanks Shaik

texroemer commented 4 years ago

There is a known limitation issue when trying to flash to latest iDRAC FW and you are currently at an older version. You are currently at 2.60, need to update to 2.61 first, then you can update to 2.70 or 2.75. See article for more details:

https://kb.dell.com/infocenter/index?page=content&id=SLN316137

shaikk-arch commented 4 years ago

Hi,

I am using Redfish API to upgrade Firmware idrac8 (FC630) /redfish/v1/UpdateService/FirmwareInventory/ /redfish/v1/UpdateService/Actions/Oem/DellUpdateService.Install/

Current Firmware version - 2.63 Tying to upgrade to - 2.70(I have extracted iDrac file .bin to firmimg.d7)

Can you please answer to this Questions

1) Is it possible upgrade with .bin file instead using .d7 ? 2) When i am upgrading using .d7 the JOBQueue created and completed 100% and IP gets Reset. But, the version is not getting updated 3) Do you have API's to upgrade the BIOS ? If yes can you please share the doc

texroemer commented 4 years ago
  1. Using Redfish to perform firmware updates, only Windows Dell Update Packages (DUP) or d7/d9 images are supported. Bin files are not supported when using any iDRAC interface to perform firmware updates.

  2. Do you have script output showing the iDRAC FW did not get updated? I just tested this and no issues.

C:\Python38-32>racadm -r 192.168.0.120 -u root -p calvin --nocertwarn getversion
 Bios Version                     = 2.11.0

 iDRAC Version                    = 2.63.60.61

 Lifecycle Controller Version     = 2.63.60.61

 IDSDM Version                    = 1.11

C:\Python38-32>DeviceFirmwareDellUpdateServiceREDFISH.py -ip 192.168.0.120 -u root -p calvin -i Now -f firmimg.d7 -l C:\Users\administrator\Downloads\iDRAC_2.70.70.70_A00

- WARNING, checking server status
- WARNING, iDRAC version detected does not support checking server status

- WARNING, downloading "firmimg.d7" image payload to iDRAC

- PASS: POST command passed to download image payload to iDRAC, 201 status code returned
- Firmware image version of downloaded payload is: 2.70.70.70

- WARNING, executing POST command to create firmware update job ID
- PASS, JID_959364843711 firmware update job ID successfully created

- WARNING, script will now loop checking the job status until marked completed

- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"
- Message: Downloading package "firmimg.d7"

- PASS, job ID JID_959364843711 successfully marked completed, detailed final job status results:

@odata.type: #DellJob.v1_0_0.DellJob
CompletionTime: 2020-07-28T06:45:08
Description: Job Instance
EndTime: None
Id: JID_959364843711
JobState: Completed
JobType: FirmwareUpdate
Message: Job completed successfully.
MessageArgs: []
MessageId: RED001
Name: Firmware Update: iDRAC
PercentComplete: 100
StartTime: TIME_NOW
TargetSettingsURI: None

- JID_959364843711 completed in: 0:03:49

- WARNING, iDRAC update detected. Script will wait 6 minutes for iDRAC to reset and come back up before checking new firmware version
- PASS, successful ping reply to iDRAC IP

- WARNING, checking server status
- WARNING, iDRAC version detected does not support checking server status

- WARNING, checking new firmware version installed for updated device

- PASS, New installed firmware version is: 2.70.70.70

C:\Python38-32>racadm -r 192.168.0.120 -u root -p calvin --nocertwarn getversion
 Bios Version                     = 2.11.0

 iDRAC Version                    = 2.70.70.70

 Lifecycle Controller Version     = 2.70.70.70

 IDSDM Version                    = 1.11
  1. Update scripts posted on GitHub, these will work on all devices iDRAC supports for updates. Example below shows using same script i used for iDRAC update, i updated the BIOS on M630. For BIOS update, server needs a reboot to apply the update so i passed in "NowAndReboot" for argument -i. For more details on what devices can be updated immediately or need a server reboot, refer to latest Lifecycle Controller User Guide, Firmware Update section.
C:\Python38-32>racadm -r 192.168.0.120 -u root -p calvin --nocertwarn getversion
 Bios Version                     = 2.10.5

 iDRAC Version                    = 2.70.70.70

 Lifecycle Controller Version     = 2.70.70.70

 IDSDM Version                    = 1.11

C:\Python38-32>DeviceFirmwareDellUpdateServiceREDFISH.py -ip 192.168.0.120 -u root -p calvin -i NowAndReboot -f BIOS_5WJG6_WN64_2.11.0.EXE -l C:\Users\administrator\Downloads

- WARNING, checking server status
- WARNING, iDRAC version detected does not support checking server status

- WARNING, downloading "BIOS_5WJG6_WN64_2.11.0.EXE" image payload to iDRAC

- PASS: POST command passed to download image payload to iDRAC, 201 status code returned
- Firmware image version of downloaded payload is: 2.11.0

- WARNING, executing POST command to create firmware update job ID
- PASS, JID_959392683572 firmware update job ID successfully created

- WARNING, script will now loop checking the job status until marked completed

- Message: Downloading the BIOS_5WJG6_WN64_2.11.0.EXE update package., current job execution time is: 0:00:07
- Message: Task successfully scheduled., current job execution time is: 0:01:15
- Message: Job in progress., current job execution time is: 0:02:25
- Message: Job in progress., current job execution time is: 0:03:32
- Message: Job in progress., current job execution time is: 0:04:38
- Message: Job in progress., current job execution time is: 0:05:43
- Message: Job in progress., current job execution time is: 0:06:49

- PASS, job ID JID_959392683572 successfully marked completed, detailed final job status results:

@odata.type: #DellJob.v1_0_1.DellJob
CompletionTime: 2020-07-28T07:35:48
Description: Job Instance
EndTime: TIME_NA
Id: JID_959392683572
JobState: Completed
JobType: FirmwareUpdate
Message: Job completed successfully.
MessageArgs: []
MessageId: PR19
Name: Firmware Update: BIOS
PercentComplete: 100
StartTime: TIME_NOW
TargetSettingsURI: None

- JID_959392683572 completed in: 0:08:16

- WARNING, checking server status
- WARNING, iDRAC version detected does not support checking server status

- WARNING, checking new firmware version installed for updated device

- PASS, New installed firmware version is: 2.11.0

C:\Python38-32>racadm -r 192.168.0.120 -u root -p calvin --nocertwarn getversion
 Bios Version                     = 2.11.0

 iDRAC Version                    = 2.70.70.70

 Lifecycle Controller Version     = 2.70.70.70

 IDSDM Version                    = 1.11
shaikk-arch commented 4 years ago

@texroemer

Tested and it worked :) Thanks so much for your support and make me understand better about the upgrades

one last quick question - how can i skip reboot option while upgrading BIOS ?

I really Appreciate it!

Thanks, Shaik

shaikk-arch commented 4 years ago

I found that in same script thanks 👍 💯

texroemer commented 4 years ago

No problem, glad to hear it's working :)

shaikk-arch commented 4 years ago

The current bios version is 2.02 and iDrac version is 2.30

API's are failing to upgrade these versions

while upgrading is see "etag" error

How can i upgrade this kind of versions?

texroemer commented 4 years ago

Since you are at a really old iDRAC version which doesn't have Redfish support, you will need to use RACADM to get iDRAC updated to 2.60 first. Then you can use Redfish to update to 2.61, then to 2.75.

Example below of the workflow you need to follow:

C:\Python38-32>racadm -r 192.168.0.120 -u root -p calvin --nocertwarn getversion

Bios Version                     = 2.11.0

 iDRAC Version                    = 2.30.30.30

 Lifecycle Controller Version     = 2.30.30.30

 IDSDM Version                    = 1.11

C:\Python38-32>DeviceFirmwareDellUpdateServiceREDFISH.py -ip 192.168.0.120 -u root -p calvin -i Now -l C:\Users\administrator\Downloads -f iDRAC-with-Lifecycle-Controller_Firmware_1HY5M_WN64_2.61.60.60_A00_02.EXE

- WARNING, checking server status
- WARNING, iDRAC version detected does not support checking server status

- WARNING, current server iDRAC version does not support Redfish firmware features. Refer to Dell online Redfish documentation for information on which iDRAC version supports firmware features.

C:\Python38-32>racadm -r 192.168.0.120 -u root -p calvin --nocertwarn update -f iDRAC-with-Lifecycle-Controller_Firmware_CX8N2_WN64_2.60.60.60_A00.EXE

        The Copying Operation has begun,
        This might take several minutes to complete, depending on the network.
        Do not interrupt the operation.
RAC987: Firmware update job for iDRAC-with-Lifecycle-Controller_Firmware_CX8N2_WN64_2.60.60.60_A00.EXE is initiated.
This firmware update job may take several minutes to complete depending on the
component or firmware being updated. To view the progress of the job, use the
"racadm jobqueue view" command. If the job is scheduled, the system will require a manual reboot.
To reboot the system  manually, use the "racadm serveraction powercycle" command.

C:\Python38-32>racadm -r 192.168.0.120 -u root -p calvin --nocertwarn jobqueue view
-------------------------JOB QUEUE------------------------
[Job ID=JID_962133083290]
Job Name=Firmware Update: iDRAC
Status=Completed
Start Time=[Not Applicable]
Expiration Time=[Not Applicable]
Message=[RED001: Job completed successfully.]
Percent Complete=[NA]
----------------------------------------------------------

C:\Python38-32>racadm -r 192.168.0.120 -u root -p calvin --nocertwarn getversion

Bios Version                     = 2.11.0

 iDRAC Version                    = 2.60.60.60

 Lifecycle Controller Version     = 2.60.60.60

 IDSDM Version                    = 1.11

C:\Python38-32>DeviceFirmwareDellUpdateServiceREDFISH.py -ip 192.168.0.120 -u root -p calvin -i Now -l C:\Users\administrator\Downloads -f iDRAC-with-Lifecycle-Controller_Firmware_1HY5M_WN64_2.61.60.60_A00_02.EXE

- WARNING, checking server status
- WARNING, iDRAC version detected does not support checking server status

- WARNING, downloading "iDRAC-with-Lifecycle-Controller_Firmware_1HY5M_WN64_2.61.60.60_A00_02.EXE" image payload to iDRAC

- PASS: POST command passed to download image payload to iDRAC, 201 status code returned
- Firmware image version of downloaded payload is: 2.61.60.60

- WARNING, executing POST command to create firmware update job ID
- PASS, JID_962142024891 firmware update job ID successfully created

- WARNING, script will now loop checking the job status until marked completed

- Message: Downloading the iDRAC-with-Lifecycle-Controller_Firmware_1HY5M_WN64_2.61.60.60_A00_02.EXE update package., current job execution time is: 0:00:04
- Message: Downloading the iDRAC-with-Lifecycle-Controller_Firmware_1HY5M_WN64_2.61.60.60_A00_02.EXE update package., current job execution time is: 0:03:48
- Message: Downloading the iDRAC-with-Lifecycle-Controller_Firmware_1HY5M_WN64_2.61.60.60_A00_02.EXE update package., current job execution time is: 0:03:54
- Message: Downloading the iDRAC-with-Lifecycle-Controller_Firmware_1HY5M_WN64_2.61.60.60_A00_02.EXE update package., current job execution time is: 0:04:43
- Message: Downloading the iDRAC-with-Lifecycle-Controller_Firmware_1HY5M_WN64_2.61.60.60_A00_02.EXE update package., current job execution time is: 0:04:52

- PASS, job ID JID_962142024891 successfully marked completed, detailed final job status results:

@odata.type: #DellJob.v1_0_0.DellJob
CompletionTime: 2020-07-31T11:54:55
Description: Job Instance
EndTime: None
Id: JID_962142024891
JobState: Completed
JobType: FirmwareUpdate
Message: Job completed successfully.
MessageArgs: []
MessageId: RED001
Name: update:DCIM:INSTALLED#iDRAC.Embedded.1-1#IDRACinfo
PercentComplete: 100
StartTime: TIME_NOW
TargetSettingsURI: None

- JID_962142024891 completed in: 0:04:57
shaikk-arch commented 4 years ago

Will RACADM works for all versions old and new bios versions? for FC630 model idrac8 and idrac7 ? also for R630 model?

texroemer commented 4 years ago

Yes, RACADM update command will work for all firmware versions of iDRAC and BIOS, also all 12G/13G platforms are supported.

shaikk-arch commented 4 years ago

Hi @texroemer

I have multiple servers which needs upgrade i am using RACADM with Reboot option

racadm -r -u <> -p <> update -f /root/BIOS_5WJG6_WN64_2.11.0.EXE --reboot

while rebooting it asks to enter the "Available options" like in below screen shot . To Avoid manual enter how can we continue with the reboot and upgrade job ? For most of the servers it asks the same to enter options. Could you please help me on this.

Screen Shot 2020-08-11 at 2 20 47 PM

Thanks, Shaik

texroemer commented 4 years ago

Hi @shaikk-arch

See this article posted on Dell site on how to get around this issue:

https://www.dell.com/support/article/en-us/sln320150/idrac8-uefi0315-error-at-post-after-downgrading-idrac8-firmware?lang=en

If you didn't downgrade the iDRAC firmware, this article still gives you details on how to reset the keys using Redfish to resolve this issue.

shaikk-arch commented 4 years ago

Awesome Thank you so much

On Wed, Aug 12, 2020 at 9:29 AM texroemer notifications@github.com wrote:

Hi @shaikk-arch https://github.com/shaikk-arch

See this article posted on Dell site on how to get around this issue:

https://www.dell.com/support/article/en-us/sln320150/idrac8-uefi0315-error-at-post-after-downgrading-idrac8-firmware?lang=en

If you didn't downgrade the iDRAC firmware, this article still gives you details on how to reset the keys using Redfish to resolve this issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dell/iDRAC-Redfish-Scripting/issues/118#issuecomment-672979343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQKFWOQN3ZZLLWUMLAEN2IDSAK7MZANCNFSM4O6XVHBQ .