We have Hitachi Storage, and on it's side we're unable to filter unused HBA wwns from hosts.
Get-VMhost -Name vmhost1 | Get-VMHostHBA -Type FibreChannel | Select VMHost,Device,@{N="WWN";E={"{0:X}" -f $_.PortWorldWideName}}, Status | Sort VMhost,Device
VMHost Device WWN Status
------ ------ --- ------
vmhost1 vmhba2 1000000533260C86 unknown
vmhost1 vmhba3 1000000533260C87 unknown
vmhost1 vmhba4 1000000533484E34 online
vmhost1 vmhba5 1000000533484E35 online
Is there any way to hide 'unknown' HBA ports, make them not visible and leave them enabled?
Ok, think I see what you want to do.
You can try the following, but be absolutely sure which path you're switching off!
$esx = Get-VMHost -Name MyEsx
$esxcli = Get-EsxCli -VMHost $esx -V2
# List paths with this
$esxcli.storage.core.path.list.Invoke()
# If you are sure which path, use the UID field from the previous command
$sArg = @{
path = 'fc.2000001b3293d30e:2100001b3293d30e-fc.500507680100b5c1:500507680110b5c1-naa.60050768018085af1800000000000023'
state = 'off'
}
$esxcli.storage.core.path.set.Invoke($sArg)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try like this
Get-VMhost -Name vmhost1 |
Get-VMHostHBA -Type FibreChannel |
Where{$_.Status -ne 'unknown'} |
Select VMHost,Device,@{N="WWN";E={"{0:X}" -f $_.PortWorldWideName}}, Status | Sort VMhost,Device
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Oh no, I'm asking not about Get commands. Is there any settings or tweaks on vmhost or VC-side to make 'unknown' HBA ports to not to show up WWNs or something like this.
Our network engeneers want to know, can they see in theyr HCS console only WWNs that currently in use. So It would be nice to stop 'translating' WWN from ports in unknown status.
Ok, think I see what you want to do.
You can try the following, but be absolutely sure which path you're switching off!
$esx = Get-VMHost -Name MyEsx
$esxcli = Get-EsxCli -VMHost $esx -V2
# List paths with this
$esxcli.storage.core.path.list.Invoke()
# If you are sure which path, use the UID field from the previous command
$sArg = @{
path = 'fc.2000001b3293d30e:2100001b3293d30e-fc.500507680100b5c1:500507680110b5c1-naa.60050768018085af1800000000000023'
state = 'off'
}
$esxcli.storage.core.path.set.Invoke($sArg)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
It showing only Active paths with WWNs
WWNN: 20:00:00:05:33:48:4e:35 WWPN: 10:00:00:05:33:48:4e:35
WWNN: 20:00:00:05:33:48:4e:34 WWPN: 10:00:00:05:33:48:4e:34
That's cool, but I need to switch off and hide this pair
VMHost Device WWN Status
------ ------ --- ------
vmhost1 vmhba2 1000000533260C86 unknown
vmhost1 vmhba3 1000000533260C87 unknown
Then I'm out of ideas I'm afraid
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
It seems there is no way. Big thanks for help