VMware Cloud Community
jxg107
Contributor
Contributor
Jump to solution

Get HBA devices/paths list with Powercli

Hi Guys,

I would like to know if is there a way to get the HBA devices list from a given vmHBA with PowerCli.

0 Kudos
25 Replies
LucD
Leadership
Leadership
Jump to solution

Not to sure how you want to display that in a report?

Targets is on the HBA level, while Paths is normally on the Device level.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
Narayanan_5245
Enthusiast
Enthusiast
Jump to solution

Apology for the delay reply. Exactly i am looking for Storage path pre-and post checks report (csv format) of ESX host & Storage activities on vCenter level.

ESX host Name,HBA Adapter,Type,Status,Device,LUN, LUN NAA ID,Targets,LUN Path State (Active or Standby).

Thanks in advance

Regards

Narayanan.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

That doesn't really answer my previous question.
Like I said earlier, I understand what you want to display, but how do you see the relation between LUN and path?

Btw, what do you already have and what is missing from your script?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
Narayanan_5245
Enthusiast
Enthusiast
Jump to solution

Hi LuCD,

Got the expected output using the below script lines which clearly gives the path state (Active or standby) and the vmbha runtime information.

Get-VMHost -PipelineVariable esx | Get-ScsiLun -LunType disk -PipelineVariable lun | Get-ScsiLunPath |

Select @{N='ESX';E={$esx.Name}},

    @{N='LUN';E={$lun.CanonicalName}},

    LunPath,State | Export-Csv "C:\HBA1.csv" -NoTypeInformation -UseCulture

Thank you

Regards

Narayanan.

0 Kudos
mlgurav
Contributor
Contributor
Jump to solution

How can modify this script for finding information about specific lun ids which I can input via a text file using getcontent.

 

The idea is to get path information for 100 luns for which I know naa IDs already.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Cross-posting your question on multiple threads doesn't really help


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos