Long story, am working to programmictally change device paths to the equivalent to "Round Robin (VMware)" as seen in vCenter -- Volume Properties -->Manage Paths -->Policy Path Selection.
Am having trouble getting the value to change through scripts. Am thinking that it requires the value as expected in the vcenter datamodel. Have yet to find it by inspecting the tables
Thanks in advance
The accepted values on the -MultipathPolicy parameter are: Fixed, MostRecentlyUsed, RoundRobin, Unknown
This changes all policies to roundrobin on a specific host
Get-VMHost <esx-hostname> | Get-ScsiLun -LunType disk | Set-ScsiLun -MultipathPolicy "roundrobin"
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The accepted values on the -MultipathPolicy parameter are: Fixed, MostRecentlyUsed, RoundRobin, Unknown
This changes all policies to roundrobin on a specific host
Get-VMHost <esx-hostname> | Get-ScsiLun -LunType disk | Set-ScsiLun -MultipathPolicy "roundrobin"
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
here's what I use, seems to work pretty well for us
Get-ScsiLun -VmHost (Get-VMHost) -LunType disk | Set-ScsiLun -MultipathPolicy "roundrobin"
or you can try
$Mypolicy = "rr" Get-Datastore | where {$_.Type -eq "VMFS"} | %{(Get-View $_.ID).Info.Vmfs.Extent[0].DiskName} |%{ $diskname = $_ Get-VMHost | %{Get-View (Get-View $_.ID).configmanager.storageSystem} | %{ $mpathpolicy = New-Object vmware.vim.HostMultipathInfoLogicalUnitPolicy $mpathpolicy.policy = $Mypolicy $_.SetMultipathLunPolicy($diskname,$mpathpolicy) } }