dell / iDRAC-Redfish-Scripting

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

InitializeVirtualDiskREDFISH.py fails saying resource not found #183

Closed stranger12345678 closed 3 years ago

stranger12345678 commented 3 years ago

./InitializeVirtualDiskREDFISH.py $args -v RAID.Slot.5-1

Disk.Virtual.0:RAID.Slot.5-1, Volume Type: NonRedundant Disk.Virtual.1:RAID.Slot.5-1, Volume Type: NonRedundant Disk.Virtual.2:RAID.Slot.5-1, Volume Type: NonRedundant Disk.Virtual.3:RAID.Slot.5-1, Volume Type: NonRedundant

./InitializeVirtualDiskREDFISH.py $args -V Disk.Virtual.1:RAID.Slot.5-1 --init Slow

texroemer commented 3 years ago

Hi @stranger12345678

This was an old script bug which has been resolved but newer version was never uploaded to GitHub. I've uploaded new version (version 5), can you try that version and see if issue has been resolved.

Thanks

stranger12345678 commented 3 years ago

Hi @texroemer Tested version 5 as well, it still doesn't work

texroemer commented 3 years ago

Using a browser session, can you run GET on URI "/redfish/v1/Systems/System.Embedded.1/Storage/RAID.Slot.5-1/Volumes/Disk.Virtual.1:RAID.Slot.5-1", see if it returns the target URI for action "Volume.Initialize"?

Can you also tell me what iDRAC version you're using and PERC controller?

Thanks

stranger12345678 commented 3 years ago

The above URI didn't work, but it worked when I Removed the Controller RAID.Slot.5-1 from URI: https://idrac_ip/redfish/v1/Systems/System.Embedded.1/Storage/Volumes/Disk.Virtual.0:RAID.Slot.5-1

And I made this change in InitializeVirtualDiskREDFISH.py, and VD initialize worked :)

diff InitializeVirtualDiskREDFISH.py InitializeVirtualDiskREDFISH.py.modified 
167c167
<     url = 'https://%s/redfish/v1/Systems/System.Embedded.1/Storage/Volumes/%s/Actions/Volume.Initialize' % (idrac_ip, virtual_disk)
---
>     url = 'https://%s/redfish/v1/Systems/System.Embedded.1/Storage/%s/Volumes/%s/Actions/Volume.Initialize' % (idrac_ip, controller, virtual_disk)

python InitializeVirtualDiskREDFISH.py $args -V Disk.Virtual.1:RAID.Slot.5-1 --init Fast

--- PASS, Final Detailed Job Status Results ---

JobState: Completed Description: Job Instance CompletionTime: 2021-10-04T06:37:26 PercentComplete: 100 StartTime: TIME_NOW MessageId: PR19 Message: Job completed successfully. EndTime: TIME_NA Id: JID_333545656301 JobType: RealTimeNoRebootConfiguration Name: Config:RAID:RAID.Slot.5-1

texroemer commented 3 years ago

Can you let me know which iDRAC version you're using?

stranger12345678 commented 3 years ago

its version 9 And controller PERC H730P

texroemer commented 3 years ago

Can you run GET on URI "redfish/v1/Managers/iDRAC.Embedded.1?$select=FirmwareVersion" to get iDRAC firmware version?

stranger12345678 commented 3 years ago

{"@odata.context":"/redfish/v1/$metadata#Manager.Manager","@odata.id":"/redfish/v1/Managers/iDRAC.Embedded.1","@odata.type":"#Manager.v1_3_3.Manager","FirmwareVersion":"3.36.36.36"}

texroemer commented 3 years ago

Thanks. 3.36 iDRAC was not DMTF compliant and wasn't using the correct URI structure for init VD. Latest iDRAC 9 version posted on Dell support is 5.00.00 which does use the correct URI structure. If you have to use 3.36 version, you'll need to modify the script as you already did to get it passing.

stranger12345678 commented 3 years ago

sure, thanks..