Unsolved
1 Message
0
280
April 23rd, 2023 20:00
Manual Update iDRAC with HTTP repository with RESTapi
Hello,
I am trying to replicate the IDRAC > Maintenance > System Update > Manual Update with a HTTP repository through PowerShell/REST API commands. In IDRAC, I basically fill in name of web server and path to repository (created with DRM), and IDRAC is able to do a self-inventory and figure out what components it needed to download. Also I figured out I can do similarly with SSH into IDRAC and run
racadm update -f Catalog.xml -e webserver/directorypath -t HTTP -a FALSE
I'm trying to copy this with RESTAPI (launched from PowerShell), and from https://developer.dell.com/apis/2978/versions/5.xx/docs/Tasks/2SimpleUpdate.md I figured that I need to do a POST against the "UpdateService.SimpleUpdate" URL, with the body that has address to the web repo like below
$uri = "https://$idrac_ip/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate"
$httpbody = @{"ImageURI"="http://webserver/repopath"; "TransferProtocol"="HTTP"} | ConvertTo-Json
$get_result = Invoke-WebRequest -UseBasicParsing -SkipCertificateCheck -SkipHeaderValidation -Uri $uri -Credential $credential -Method Post -Body $httpbody -ContentType 'application/json' -Headers @{"Accept"="application/json"} -ErrorVariable RespErr
The request seems to be submitted fine but when I check the Job Queue, IDRAC seems to go straight to Firmware Update: Generic, and it fails to download anything. Compared to when I do this through the web interface, there usually is a "Check Update from Repo" job first, then the download of needed firmware. It looks like the RESTAPI command seems to be telling IDRAC to download the update file directly, rather than checking against the repository (there is a Catalog.xml in the repopath directory).
Has anyone got this to work? If so pls help point me in the right direction. Appreciate the help in advance.
Thanks. -Luke