Hi,
I am trying to identify the current HBA queue depth on ESXi hosts
esxcli system module parameters list -m nfnic
and then I would like to set
esxcli system module parameters set -m nfnic -p lun_queue_depth_per_path=128
I tried as below to get the current status, but I am getting error
Script
$esx_hosts = get-vmhost
$report = foreach ($esx_host in $esx_hosts) {
Write-Host $esx_host
$esxcli = Get-EsxCli -VMhost $esx_host -V2
$esxcli.system.module.parameters.list.invoke()
}
$report | ft -auto
Error
The method 'list' is invoked with '0' parameters, but the expected parameter count is '1'.
At D:\HBA_Queue_Depth.ps1:7 char:1
+ $esxcli.system.module.parameters.list.invoke()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], InvalidArgument
+ FullyQualifiedErrorId : VMware.VimAutomation.ViCore.Types.V1.ErrorHandling.InvalidArgument
You have to provide the modulename
ForEach-Object -Process {
$esxcli = Get-EsxCli -VMhost $esx -V2
$modSetting = $esxcli.system.module.parameters.list.Invoke(@{module='nfnic'})
if($modsetting.Value -ne 128){
$value = @{
module = 'nfnic'
parameterstring = 'lun_queue_depth_per_path=128'
}
$esxcli.system.module.parameters.set.Invoke($value)
}
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You have to provide the modulename
ForEach-Object -Process {
$esxcli = Get-EsxCli -VMhost $esx -V2
$modSetting = $esxcli.system.module.parameters.list.Invoke(@{module='nfnic'})
if($modsetting.Value -ne 128){
$value = @{
module = 'nfnic'
parameterstring = 'lun_queue_depth_per_path=128'
}
$esxcli.system.module.parameters.set.Invoke($value)
}
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you LucD. worked perfectly