Hi,
I'm trying to replicate the following esxcli command using the esxcli cmdlet
esxcli nmp satp addrule --vendor="Pillar" --claim-option="tpgs_on" --satp="VMW_SATP_ALUA" --description="Pillar Axiom ALUA Support"
I started with this
connect-viserver <myEsxHost>
$esxcli=Get-Esxcli
$esxcli.nmp.satp.listrules() | group-Object –Property "Vendor" # to list all satp rules defined
$esxcli.nmp.satp.addrule("tpgs_on","Pillar Axiom ALUA Support",$null,$null,$null,$null,$null,$null,$null,"VMW_SATP_ALUA",$null,"PILLAR")
The remote server returned an error: (500) Internal Server Error.
At line:1 char:25
+ $esxcli.nmp.satp.addrule <<<< ( "tpgs_on", "Pillar Axiom ALUA Support", $null, $null, $null, $null, $null, $null, $null, "VMW_SATP_ALUA", $null, "PILLAR")
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodInvocationException
any idea of what I'm doing wrong ?
Hi,
I tried the same call. The first time it passed without problems and returned true. The second time it throw the internal server error. Probably the reason is that the rule already exist. Can you try it on another host?
Vitali
PowerCLI Team
After connecting to the ESX host, you should first issue:
$esxcli = Get-EsxCli
Now you can proceed using the esxcli through the $esxcli variable.
thanks avlleshout.
I just miss to include it in my example but I did it in my script.
The esxcli.nmp.satp.listrules() | group-Object –Property "Vendor" cmdlet that I'm using to get the defined rules is working as expected.
The issue I have is with the addrule() method.
Hi,
I tried the same call. The first time it passed without problems and returned true. The second time it throw the internal server error. Probably the reason is that the rule already exist. Can you try it on another host?
Vitali
PowerCLI Team
Hi,
Vitali you're right!
The error message is not clear but the rule have been created.
I know that because using the esxcli command line I get a (much more useful) duplicated rule error message.
I tried to check the existence of the new rule using the listrules() method
$esxcli.nmp.satp.listrules() | ft
but I can't find any information regarding my rule.
Are you getting different results ?
Thanks
I seem to experience the same thing here, I can add a rule (nor error) but I can't seem to list it.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi,
I can't see the rule with listrules(). Also check esxcli excutable within the ESX console - the rule does not appear there. I'm not sure where's the problem.
About the error messagae - I will file a bug to check is it possible to obtain the detailed error message thrown by esxcli method call.
Vitali
Nice.
Anyway the new "hidden" rule seems working fine because I successfully changed the RR default settings.
Thanks
Fabio