Contributor
Contributor

How to do this via PowerCLI "esxcli nmp roundrobin setconfig...." ?

Hi,

I am looking for a Way to set the "iops" Option/Value for the RoundRobin Multipathingpolicy via PowerCLI.

Via CLI it is "esxcli nmp roundrobin setconfig --type “iops” --iops 1 --device naa.*"

Anyone who can help me?

Tanks

Nico

0 Kudos
7 Replies
Leadership
Leadership

This should do the trick

Get-ScsiLun -VmHost (Get-VMHost $esxName) -LunType disk |  Set-ScsiLun -MultipathPolicy "roundrobin"


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

0 Kudos
Contributor
Contributor

Thank You,

but changing the Policy to RoundRobin is not the main Problem.

What I like to do is to set Parameters to the RoundRobin Policy, so that the Access Path is changed on each IO.

(suggested by HP EVA Best Practice for vSphere)

HP gives an Example how to do this by CLI "esxcli nmp roundrobin setconfig --type “iops” --iops 1 --device naa.*".

I would like to know how to do this by PowerCLI to integrate im my Scripts.

I already took a look at these two Set-SCSILun Options (CommandsToSwitchPath,BlocksToSwitchPath); by Description they seem similar to the "--iops 1", but I am not able to set a Value (I have to test again to post the error Message)

CU

Nico

0 Kudos
Immortal
Immortal

The switchpaths arguments don't work against vSphere. The underlying support for these disappeared between ESX 3.5 and ESX 4.0. What you're trying to do may not be possible via the public API with ESX 4 (esxcli uses a private API). Your best bet is to check the HostStorageSystem related APIs to be sure.

=====

Carter Shanklin

Read the PowerCLI Blog
[Follow me on Twitter|http://twitter.com/cshanklin]

0 Kudos
Community Manager
Community Manager

I don't think it's possible using the HostStorageSystem, since this is specific to the new Pluggable Storage Architecture arch and esxcli. I know there are some 'undocumented' features regarding esxcli but I've not played with them much. Probably the best bet is to download vCLI for Windows and just use esxcli to configure the settings until the esxcli APIs are expose via the vSphere APIs

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
Contributor
Contributor

Hi all,

I will attach 32 vSphere 4u1 Hosts to an existing IBM SVC Cluster soon, so I took a closer look to Round Robin (there are only 3.5 Nodes using FixedPath attached to the SVC so far).

There is one thing I could not find in any document:

WHEN is the path that is used for accessing a LUN selected? When doing a rescan is clear, but AFAIR there were two paramters in 3.5 RoundRobin that initiated a re-deciscion of paths.

So my question is: Will the path change during runtime (once the LUN has been connected)? If so, when and with which strategy?

A link to a VMware document about all this would be great!

Thank You in advance!

Marcus

0 Kudos
Enthusiast
Enthusiast

As far as I know this is not possible via PowerCLI...which is why I use vMA to configure my ESXi 4.x hosts for roundrobin (EVA 8100).

# Set Default PSP for VMW_SATP_ALUA to VMW_PSP_RR (Round Robin)
esxcli nmp satp setdefaultpsp --satp VMW_SATP_ALUA --psp VMW_PSP_RR

# Set IO Operation Limit to 1 (Default is 1000) [and enable use of Non-optimal paths (this may not be a good idea)].
esxcli nmp roundrobin setconfig --type=iops --iops 1 --useANO 1 --device <device.id>

0 Kudos
Immortal
Immortal

You don't need all of vMA for this, if necessary you can install vCLI, take esxcli and throw the rest out.

=====

Carter Shanklin

Read the PowerCLI Blog
[Follow me on Twitter|http://twitter.com/cshanklin]

0 Kudos