Cisco UCS – How to Query UCS for WWN’s Associated with Blades
These are very useful trick’s in order to obtain a list of WWN’s associated with the blades in a UCS environment. Instead of trawling through the GUI you can easily […]
Virtualization & Storage
These are very useful trick’s in order to obtain a list of WWN’s associated with the blades in a UCS environment. Instead of trawling through the GUI you can easily […]
These are very useful trick’s in order to obtain a list of WWN’s associated with the blades in a UCS environment. Instead of trawling through the GUI you can easily connect to UCS via the Cisco UCS PowerTool or SSH to the Fabric Interconnect and quickly retrieve the WWN information for each/All Host/blade’s in UCS.
UCS PowerTool
You can download the latest version of Cisco UCS PowerTool from:
UCS PowerTool Download
Firstly launch the UCS PowerTool and Connect to the UCS system by issuing the cmd:
PS C:\> Connect-Ucs
Enter your fabric interconnect IP address hitting the return key and then inputting your creds.
Once you have connected enter the following cmd to bring up a list of all the blades (service profiles) and their associated vHBA WWN’s:
PS C:\> Get-UcsServiceProfile -type instance | Get-UcsVhba | Select Dn,Addr,NodeAddr
If you want to reduce the list to only WWPN‘s, then use the following:
PS C:\> Get-UcsServiceProfile -type instance | Get-UcsVhba | Select Dn,Addr
Filter by “vHBA-0”:
Get-UcsServiceProfile -type instance |Get-UcsVhba | select DN,Name,Addr| where {$_.Name -eq “vHBA-0”} | sort DN
Filter by “vHBA-1”:
Get-UcsServiceProfile -type instance |Get-UcsVhba | select DN,Name,Addr| where {$_.Name -eq “vHBA-1”} | sort DN
In order to display the associated VSAN details:
PS C:\> Get-UcsServiceProfile -type instance | Get-UcsVhba | Get-UcsVhbaInterface | select Dn,Initiator,Vnet
Get all service profile instances in UCS:
PS C:\> Get-UcsServiceProfile –Type instance
List Boot Policy assigned to each blade:
C:\> Get-UcsServiceProfile -type instance | select Name,BootPolicyName
Fabric Interconnect CLI
Another option is to connect directly to the fabric interconnect. Using the cmd “fi01-A# show server adapter identity” will return a detailed list all of the UCS blades WWN details:
For a brief list of all WWN’s assigned to each host use this simple cmd:
sh identity wwn
• To list an individual server WWPN details:
fiA-31-A# scope chassis 1
fiA-31-A /chassis # scope server 1
fiA-31-A /chassis/server # scope adapter 1
fiA-31-A /chassis/server/adapter # show host-fc-if
FC Interface:
Id Wwn Model Name Operability
———- ———————– ———- ———- ———–
1 20:00:00:25:B5:25:A0:6F UCSB-MLOM-40G-01
vHBA-0 Operable
2 20:00:00:25:B5:25:B1:6F UCSB-MLOM-40G-01
vHBA-1 Operable
• From the scope server is is also possible to learn the DN(Distinguished Name):
fiA-31-A /chassis/server # show server adapter vnics
FC Interface:
Adapter Interface Vnic Dn Dynamic WWPN Type
——- ——— ———- ———— —-
1 1 org-root/ls-xap-esx001/fc-vHBA-0 20:00:00:25:B5:25:A0:6F Fc
1 2 org-root/ls-xap-esx001/fc-vHBA-1 20:00:00:25:B5:25:B1:6F Fc
• Check which vHBA is assigned to fabric A/B:
fiA-31-A# scope service-profile server 1/1
fiA-31-A /org/service-profile # show vhba
vHBA:
Name Fabric ID Dynamic WWPN
———- ——— ————
vHBA-0 A 20:00:00:25:B5:25:A0:6F
vHBA-1 B 20:00:00:25:B5:25:B1:6F
• Get a full List of all WWPN’s based on Fabric A/B:
fiA-31-A# scope org
fiA-31-A /org # show wwn-pool
WWN Pool:
Name Purpose Size Assigned
——————– —————————- ———- ——–
Global-WWNN-Pool Node WWN Assignment 128 9
vHBA-0-Fabric-A Port WWN Assignment 128 9
vHBA-1-Fabric-B Port WWN Assignment 128 9
• List all Fabric-A WWPN and DN information:
fiA-31-A# scope org
fiA-31-A /org # scope wwn-pool vHBA-0-Fabric-A
fiA-31-A /org/wwn-pool # show initiator
WWN Initiator:
Id Name Assigned Assigned To Dn
———————– ———- ——– ————–
20:00:00:25:B5:25:A0:6F Yes org-root/ls-xap-esx001/fc-vHBA-0
• List all Fabric-B WWPN and DN information:
fiA-31-A# scope org
fiA-31-A /org # scope wwn-pool vHBA-1-Fabric-B
fiA-31-A /org/wwn-pool # show initiator
WWN Initiator:
Id Name Assigned Assigned To Dn
———————– ———- ——– ————–
20:00:00:25:B5:25:B1:6F Yes org-root/ls-xap-esx001/fc-vHBA-1
Thank you ‘Brendan Lucey’ for your assistance.
Ramblings by Keith Lee
Discussions about all things VxRail.
Random Technology thoughts from an Irish Virtualization Geek (who enjoys saving the world in his spare time).
Musings of a VMware Cloud Geek
Converged and Hyper Converged Infrastructure
'Scamallach' - Gaelic for 'Cloudy' ...
Storing data and be awesome
Best Practices et alia
Every Cloud Has a Tin Lining.
Dave,
Thanks for the great PowerShell example. You might want to consider submitting something to the Cisco UCS Power Scripting contest. Details here: http://blogs.cisco.com/datacenter/ciscoscripts/
Bill
Full disclosure, I’m a Cisco employee.
You can also just do `sh identity wwn` from either FI to get a list of all vHBAs.
Thanks Joe