VMware Cloud Community
ganapa2000
Hot Shot
Hot Shot
Jump to solution

Unable to nfnic queue depth

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

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You have to provide the modulename

Get-VMHost -PipelineVariable esx |

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

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

You have to provide the modulename

Get-VMHost -PipelineVariable esx |

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

Reply
0 Kudos
ganapa2000
Hot Shot
Hot Shot
Jump to solution

Thank you LucD. worked perfectly Smiley Happy

Reply
0 Kudos