VMware Cloud Community
MikeEracleous
Contributor
Contributor
Jump to solution

Trying to set iops through $esxcli.storage.nmp.satp.rule.add

I have spent the better part of a day unsuccessfully trying to set some option.  After reading another post which claimed to work I am now trying:

# List the parameters in a hash table
$esxcli.storage.nmp.satp.rule.add.CreateArgs()

# Fill the hash table (optional params are not required)
$sRule = @{

satp = 'VMW_SATP_ALUA'
psp = 'VMW_PSP_RR'
'psp-option' = 'iops=250'
vendor = 'INF-01-00'
model = 'NetApp'
description = 'NetApp Custom Rule'
}

# Call the esxcli command

$esxcli.storage.nmp.satp.rule.add.Invoke($SRule)

But none of this works, I keep getting an error "Index (zero based) must be greater than or equal to zero and less than the size of the argument list." 

No matter what I try I am unable to get anything back when trying to set the iops. I am using PowerCLI 13.

 

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

That 'psp-option' key is not valid, that should be 'pspoption'.

Also the vendor name 'INF-01-00' is not accepted, the error misleadingly states "Error adding SATP user rule: Unable to add new SATP claim rule: Name too long"

This seems to work for me

# Fill the hash table (optional params are not required)
$sRule = @{
  satp = 'VMW_SATP_ALUA'
  psp = 'VMW_PSP_RR'
  pspoption = 'iops=250'
  vendor = 'INF0100'
  model = 'NetApp'
  description = 'NetApp Custom Rule'
}

# Call the esxcli command
$esxcli.storage.nmp.satp.rule.add.Invoke($SRule)

 


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

View solution in original post

3 Replies
LucD
Leadership
Leadership
Jump to solution

That 'psp-option' key is not valid, that should be 'pspoption'.

Also the vendor name 'INF-01-00' is not accepted, the error misleadingly states "Error adding SATP user rule: Unable to add new SATP claim rule: Name too long"

This seems to work for me

# Fill the hash table (optional params are not required)
$sRule = @{
  satp = 'VMW_SATP_ALUA'
  psp = 'VMW_PSP_RR'
  pspoption = 'iops=250'
  vendor = 'INF0100'
  model = 'NetApp'
  description = 'NetApp Custom Rule'
}

# Call the esxcli command
$esxcli.storage.nmp.satp.rule.add.Invoke($SRule)

 


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

ldclancy2
Contributor
Contributor
Jump to solution

Thanks again LucD!

That was a particularily nasty one as it is actually listed as "psp-option" in the help - $esxcli.storage.nmp.satp.rule.add.Help() !

 
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Yes, there are a few other discrepancies between the Help and reality I'm afraid.


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

0 Kudos