HPE OneView
1753886 Members
7391 Online
108809 Solutions
New Discussion

Re: DL inventory in OneView

 
MCSAP
Frequent Advisor

DL inventory in OneView

 

 

I'm trying to figure out how to view the hardware inventory of my DL Gen9 & 10 servers in OneView 4.20.01.01 instance.  I've used the web console, powershell, and restapi to see if I can find the hard drive inventory specifically.  It doesn't seem possible for rack mount servers or I'm not that advanced.

Any ideas on how I can get an inventory of hardware components of my DL servers?  Current use case is to query our servers with the same model SSD devices.

DL380G9.PNG

 

8 REPLIES 8
Siddhartha_M
Advisor

Re: DL inventory in OneView

Hello,

Please check the below user guide and management guide.

https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-a00037746en_us&docLocale=en_US

https://h20628.www2.hp.com/km-ext/kmcsdirect/emr_na-a00064085en_us-1.pdf

For further support please log a support case.

I am HPE Employee

I am a HPE Employee
MCSAP
Frequent Advisor

Re: DL inventory in OneView

I appreciate the links to the guides; however, they do not go into detail on the inventory reporting through the GUI, POWERCLI, or RESTAPI.

Anyone have luck pulling hardware component inventory from the DL servers in OneView?

ChrisLynch
HPE Pro

Re: DL inventory in OneView

Unfortunately, that is a gap with rack mount servers (DL/ML/Apollo) within OneView today.  Do know that we are addressing this in a future update.  However, since we have not announced any future releases yet, I am unable to comment in a public form.  If you have an active NDA with HPE, I would kindly ask you reach out to your HPE account team to find out about an HPE OneView roadmap meeting.  We can then share our plans and future directions there.


I am an HPE employee

Accept or Kudo

MCSAP
Frequent Advisor

Re: DL inventory in OneView

Chris, I appreciate your candor by admitting this is a gap with the product.  One of many gaps in my opinion.  OneView has been around for years with muliple revisions now and from my understanding it is supposedly the manager of managers for our HPE infrastructure.  However, we are unable to use it for even rudimentary activities such as pulling hardware inventories of our systems.

I've posted my frustrations with using OneView to patch ESXi hosts and all the caveats.  Add this to the ever growing list - I'm certain there will be more as I work more with the product and HPE hardware. 

I really hope HPE engineers are listening to the customer base and hearing our frustrations with the solution.  

ChrisLynch
HPE Pro

Re: DL inventory in OneView

Yes, we in product management and R&D listen to customer feedback.  In fact, a number of threads on this forum has been used to justify feature prioritization.  One example would be feedback on being able to display the OS hostname in the Server Hardware inventory like the c-Class Onboard Administrator can.

If you are coming to HPE Discover 2019 Las Vegas next month, you will have opportunities to talk to us directly.  Otherwise, I would again suggest you reach out to your sales team to setup a meeting with us to discuss this topic in greater detail.


I am an HPE employee

Accept or Kudo

Steve_Tippett
Frequent Advisor

Re: DL inventory in OneView

The Powershell cmdlets will provide many details regarding the disk drives in DL (Gen 8 & Gen 9) servers.  

Use the Get-HPEiLoSmartArrayStorageController cmdlet.   I have a PS script that writes this info out to a spreadsheet.

Get-HPEiLoSmartArrayStorageControllerGet-HPEiLoSmartArrayStorageController

Tuura
Senior Member

Re: DL inventory in OneView

Hi Steve,

I am just looking for that kind of script. I have a script that reads the Smart Array information, but can't get the output right.

Can you share your script with us?

Thx already, Tuura

Steve_Tippett
Frequent Advisor

Re: DL inventory in OneView

<# to capture disk drive info for evaluating exposure to HPE advisories.


Maintenance Log:
Nov 21, 2017 - checking iLo type, iLo2 & iLo3 don't respond with data.
Nov 22, 2017 - added logic for 2 controllers. If there are servers with 3 or more controllers, this logic won't handle them!


#>

Function Process-Controller-Instances # Maximum of two via this logic
{
IF ($Result.Controllers.Count -eq $null)
{
$Controller_Count = 0
$Controller_Data = 'No Controllers Present' + ';;;;;;;;'
Continue
}
ELSE
{
$Controller_Count = $Result.Controllers.Count
$Loop_Count = 0
While ($Loop_Count -lt $Controller_Count) # The data array of controller info starts with instance 0
{
$Controller_Data = $Controller_Data + $Result.Controllers[$Loop_Count].Status.State + ';' + $Result.Controllers[$Loop_Count].Model + ';' + $Result.Controllers[$Loop_Count].FirmwareVersion + ';'
$Loop_Count = $Loop_Count + 1
}
} # END ELSE
IF ($Controller_Count -eq 1)
{
$Controller_Data = $Controller_Data + ';;;' # pad the output line for the missing Controller 2 fields so CSV headings will be accurate
}

} # END Function Process-Controller-Instances


Function Process-Drive-Instances # delimit with semi-colons, because some of the fields returned via the query will have embedded commas
{
$Loop_Count = 0
[string]$Physical_Drive_Count = $Result.Controllers[0].PhysicalDrives.count
$Controller_Data = $Controller_Data + $Physical_Drive_Count + ';' # Add the drives count to the correct output holding area

IF ($Physical_Drive_Count -ne 0)
{
$Drives_Data = $Result.Controllers[0].PhysicalDrives[$Loop_Count].LocationFormat + ';'
While ($Loop_Count -lt $Physical_Drive_Count) # The data array of physical drive info starts with instance 0
{
$Drives_Data = $Drives_Data + $Result.Controllers[0].PhysicalDrives[$Loop_Count].Location + ';'
$Drives_Data = $Drives_Data + $Result.Controllers[0].PhysicalDrives[$Loop_Count].MediaType + ';'
$Drives_Data = $Drives_Data + $Result.Controllers[0].PhysicalDrives[$Loop_Count].CapacityGB + ';'
$Drives_Data = $Drives_Data + $Result.Controllers[0].PhysicalDrives[$Loop_Count].Model + ';'
$Drives_Data = $Drives_Data + $Result.Controllers[0].PhysicalDrives[$Loop_Count].SerialNumber + ';'
$Drives_Data = $Drives_Data + $Result.Controllers[0].PhysicalDrives[$Loop_Count].FirmwareVersion + ';'
$Loop_Count = $Loop_Count + 1
} # END 1st controller - Loop through Physical Drives
} # END IF

$Loop_Count = 0
$Physical_Drive_Count = $Result.Controllers[1].PhysicalDrives.count
$Controller_Data = $Controller_Data + $Physical_Drive_Count + ';' # Add the drives count to the correct output holding area

IF ($Physical_Drive_Count -ne 0)
{
$Drives_Data = $Result.Controllers[1].PhysicalDrives[$Loop_Count].LocationFormat + ';'
While ($Loop_Count -lt $Physical_Drive_Count)
{
$Drives_Data = $Drives_Data + $Result.Controllers[1].PhysicalDrives[$Loop_Count].Location + ';'
$Drives_Data = $Drives_Data + $Result.Controllers[1].PhysicalDrives[$Loop_Count].MediaType + ';'
$Drives_Data = $Drives_Data + $Result.Controllers[1].PhysicalDrives[$Loop_Count].CapacityGB + ';'
$Drives_Data = $Drives_Data + $Result.Controllers[1].PhysicalDrives[$Loop_Count].Model + ';'
$Drives_Data = $Drives_Data + $Result.Controllers[1].PhysicalDrives[$Loop_Count].SerialNumber + ';'
$Drives_Data = $Drives_Data + $Result.Controllers[1].PhysicalDrives[$Loop_Count].FirmwareVersion + ';'
$Loop_Count = $Loop_Count + 1
} # END 2nd controller - Loop through Physical Drives
} # END IF
} #End Function Process-Drive-Instances

# Begin MAIN Logic

$StopWatch = [System.Diagnostics.Stopwatch]::StartNew()
Clear-Host
$Current_Path = (get-item -path ".\" -verbose).fullname
$host.ui.RawUI.WindowTitle = $Current_Path + '\Hard-Drive-Data-Capture.ps1'
Mode 123,1000

$TargetsFile = 'Targets.txt'
$OutputFile = 'Results.txt'

If (Test-Path $OutputFile) { Remove-Item $OutputFile }

# Initialize the CSV file, using semi-colons, because some of the fields returned will have embedded commas
$CSV_line = 'iLo IP;iLo Hostname;iLo Type;Controller 1 Status;Controller 1 Type;Controller 1 Firmware;Controller 2 Status;Controller 2 Type;Controller 2 Firmware;Controller 1 # of drives;Controller 2 # of drives;Drive Location Key;'
$CSV_line = $CSV_line + 'Drive 1 Location;Drive 1 Type;Drive 1 Capacity;Drive 1 Model;Drive 1 S/N;Drive 1 Firmware;Drive 2 Location;Drive 2 Type;Drive 2 Capacity;Drive 2 Model;Drive 2 S/N;Drive 2 Firmware;'
$CSV_line = $CSV_line + 'Drive 3 Location;Drive 3 Type;Drive 3 Capacity;Drive 3 Model;Drive 3 S/N;Drive 3 Firmware;Drive 4 Location;Drive 4 Type;Drive 4 Capacity;Drive 4 Model;Drive 4 S/N;Drive 4 Firmware;'
$CSV_line = $CSV_line + 'Drive 5 Location;Drive 5 Type;Drive 5 Capacity;Drive 5 Model;Drive 5 S/N;Drive 5 Firmware;Drive 6 Location;Drive 6 Type;Drive 6 Capacity;Drive 6 Model;Drive 6 S/N;Drive 6 Firmware;'
$CSV_line = $CSV_line + 'Drive 7 Location;Drive 7 Type;Drive 7 Capacity;Drive 7 Model;Drive 7 S/N;Drive 7 Firmware;Drive 8 Location;Drive 8 Type;Drive 8 Capacity;Drive 8 Model;Drive 8 S/N;Drive 8 Firmware;'
$CSV_line = $CSV_line + 'Drive 9 Location;Drive 9 Type;Drive 9 Capacity;Drive 9 Model;Drive 9 S/N;Drive 9 Firmware;Drive 10 Location;Drive 10 Type;Drive 10 Capacity;Drive 10 Model;Drive 10 S/N;Drive 10 Firmware;'
$CSV_line = $CSV_line + 'Drive 11 Location;Drive 11 Type;Drive 11 Capacity;Drive 11 Model;Drive 11 S/N;Drive 11 Firmware;Drive 12 Location;Drive 12 Type;Drive 12 Capacity;Drive 12 Model;Drive 12 S/N;Drive 12 Firmware;'
$CSV_line = $CSV_line + 'Drive 13 Location;Drive 13 Type;Drive 13 Capacity;Drive 13 Model;Drive 13 S/N;Drive 13 Firmware;Drive 14 Location;Drive 14 Type;Drive 14 Capacity;Drive 14 Model;Drive 14 S/N;Drive 14 Firmware;'
$CSV_line = $CSV_line + 'Drive 15 Location;Drive 15 Type;Drive 15 Capacity;Drive 15 Model;Drive 15 S/N;Drive 15 Firmware;Drive 16 Location;Drive 16 Type;Drive 16 Capacity;Drive 16 Model;Drive 16 S/N;Drive 16 Firmware;'
$CSV_line = $CSV_line + 'Drive 17 Location;Drive 17 Type;Drive 17 Capacity;Drive 17 Model;Drive 17 S/N;Drive 17 Firmware;Drive 18 Location;Drive 18 Type;Drive 18 Capacity;Drive 18 Model;Drive 18 S/N;Drive 18 Firmware;'
$CSV_line = $CSV_line + 'Drive 19 Location;Drive 19 Type;Drive 19 Capacity;Drive 19 Model;Drive 19 S/N;Drive 19 Firmware;Drive 20 Location;Drive 20 Type;Drive 20 Capacity;Drive 20 Model;Drive 20 S/N;Drive 20 Firmware;'
$CSV_line = $CSV_line + 'Drive 21 Location;Drive 21 Type;Drive 21 Capacity;Drive 21 Model;Drive 21 S/N;Drive 21 Firmware;Drive 22 Location;Drive 22 Type;Drive 22 Capacity;Drive 22 Model;Drive 22 S/N;Drive 22 Firmware;'
$CSV_line = $CSV_line + 'Drive 23 Location;Drive 23 Type;Drive 23 Capacity;Drive 23 Model;Drive 23 S/N;Drive 23 Firmware;Drive 24 Location;Drive 24 Type;Drive 24 Capacity;Drive 24 Model;Drive 24 S/N;Drive 24 Firmware;'
$CSV_line = $CSV_line + 'Drive 25 Location;Drive 25 Type;Drive 25 Capacity;Drive 25 Model;Drive 25 S/N;Drive 25 Firmware;Drive 26 Location;Drive 26 Type;Drive 26 Capacity;Drive 26 Model;Drive 26 S/N;Drive 26 Firmware;'

Out-File $OutputFile -Encoding ascii -InputObject $CSV_line
Import-Module HPEiLOCmdlets

$TargetList = Get-Content $TargetsFile
ForEach ($iLo_target in $TargetList)
{
$iLo_Info = $null
$Result = $null
$CSV_line = ' '
[string]$Controller_Data = ' '
[string]$Drives_Data = ' '

$Connected_iLo = Connect-HPEiLO -IP $iLo_target -Username 'local iLO username goes here' -Password 'password goes here' -DisableCertificateAuthentication -ErrorAction SilentlyContinue
IF ($Connected_iLo -eq $null)
{
$CSV_line = $iLo_target + ';' + 'NO RESPONSE TO CONNECTION REQUEST'
Out-File $OutputFile -Append -Encoding ascii -InputObject $CSV_line
Write-Host $CSV_line -ForegroundColor Yellow
Continue
}

$iLo_Info = Get-HPEiLOFirmwareVersion -Connection $Connected_iLo
IF ($iLo_Info -eq $null)
{
$CSV_line = $iLo_target + ';' + 'no useful data returned from older generation iLo'
Out-File $OutputFile -Append -Encoding ascii -InputObject $CSV_line
Write-Host $CSV_line -ForegroundColor Yellow
Disconnect-HPEiLO -Connection $Connected_iLo
Continue # Skip to the next $iLo_target - this is likely an iLo 2 / iLo 3
}

$Result = $null
$Result = Get-HPEiLoSmartArrayStorageController -Connection $Connected_iLo -ErrorAction SilentlyContinue
IF (($Result -eq $null) -or ($Result.Controllers -eq $null)) #some iLo's (sick ones?) provide just a partial response with some null fields
{
$CSV_line = $iLo_target + ';' + 'Request for storage controller data timed out or was insufficiently fulfilled'
Out-File $OutputFile -Append -Encoding ascii -InputObject $CSV_line
Write-Host $CSV_line -ForegroundColor Yellow
Continue
}

IF (($Result.Status -eq 'WARNING') -or ($Result.Status -eq 'ERROR'))
{
$CSV_line = $iLo_target + ';' + $Result.StatusInfo.Message
Out-File $OutputFile -Append -Encoding ascii -InputObject $CSV_line
Write-Host $CSV_line -ForegroundColor Yellow
Continue
}

. Process-Controller-Instances
. Process-Drive-Instances

# Assemble the results fields (variable lengths possible)
$CSV_line = $iLo_target + ';' + $iLo_Info.Hostname + ';' + $iLo_Info.ManagerType + ';' + $Controller_data + $Drives_data ### Need Hostname from $iLo_Info
Write-Host $CSV_line -ForegroundColor Cyan
Write-Host
Write-Host ' Elapsed time is now' $StopWatch.Elapsed.Hours 'Hour' $StopWatch.Elapsed.Minutes 'Minutes' $StopWatch.Elapsed.Seconds 'Seconds' -ForegroundColor White
Write-Host
Out-File $OutputFile -Append -Encoding ascii -InputObject $CSV_line
Disconnect-HPEiLO -Connection $Connected_iLo
}

Write-Host "`n****** Script execution completed ****** `n Press Enter please . . . ." -ForegroundColor Green
Read-Host