You've probably already figured it out by now, but you can also set RoundRobin policy on already connected LUNs through Powershell.
I'll include the script i use, just as future reference for people trying to do the same thing.
script will take the vcenter ip or hostname, and part of the LUNs canonical name (naa.600...., use whatever part that matches all the LUNs you want to set RR on) as parameters.
RR policy will be set on all matching LUNs, on all hosts, in all clusters across your datacenter.
This is just a script i found somewhere, and edited a bit to use parameters.
I also have a second one that sets the iops, copied from this thread and modified to take parameters (ESX host and diskid) like the first.
Next step is combining the two to have RR policy and iops set in one go.
setroundrobin.ps1.zip 472 bytes
Has anyone found a way to set it up to that the default setting for IOPS=1 for all future LUNs?
I'm trying your script and getting this error. Please help!
Connect-VIServer $esx -Credential <<<< $esxCred | Out-Null
Connect-VIServer : The argument cannot be null or empty.
At C:\temp\set_mpath_iops.ps1:13 char:35
I'm using PoweCLI 4.1.1 at vCenter and ESXi 4.1.
If you don't have credentials stored in the variable, you can prompt for them.
Something like this
Connect-VIServer $esx -Credential (Get-Credential) | Out-Null
Or you can promtp before with this
$esxCred = Get-Credential
Connect-VIServer $esx -Credential $esxCred | Out-Null
$esxCred needs to contain your esx credentials. Use:
$esxCred = get-credential
Or use -username and -password parameters instead.
You need to provide login credentials for your esx host.
Sent from my iPad
Don't know how to set iops=1 as default, but i finished my script for setting RR and iops in one go.
Every time a lun is added, i just rerun the script.
script loads the vmware snap-in itself, so you can just start it using 'run with powershell' from the right-click menu, without having to start vsphere powercli first.
Prompts for vcenter and esx host credentials (assumes host credentials are identical for all hosts)
vcenter address, diskID and SATP for your array should be set as variables. (eg VMW_SATP_ALUA for HP EVA or VMW_SATP_DEFAULT_AA for EMC NX4, just check what ESX chooses)
The setting the roundrobin part from Arnim wouldn't work for me, so i used that part from the other script.
Added a sleep for 20 seconds at the end, so you can see what changed (shows iops before and after).
setrrandiops1.ps1.zip 1.1 K
Somebody award patrickds some points!