VMware Cloud Community
chakoe
Enthusiast
Enthusiast

Set ESX-Host-Multipathing

Hi,

i use the following script to set the Host Multipathing to RoundRobin.

Question:

Is there a chance to retrieve the current settings from the Host? HOw?

#####

$vmhs = Get-VMHost d100spwesxc09*.d100.intern

foreach ($vmh in $vmhs)

{

$hostview = Get-View $vmh.id

$storageSystem = Get-View $hostview.ConfigManager.StorageSystem

$policy = new-object VMware.Vim.HostMultipathInfoLogicalUnitPolicy

$policy.policy = "rr"

$storageSystem.StorageDeviceInfo.MultipathInfo.lun |

where { $_.Path.length -gt 1 } |

foreach { $storageSystem.SetMultipathLunPolicy($_.ID, $policy) }

}

####

Thx in advance

Chakoe

0 Kudos
1 Reply
LucD
Leadership
Leadership

You can use the Get-ScsiLun to retrieve the current multi-pathing policy.

And you can use the Set-ScsiLun cmdlet to change the policy. But be aware of the reported bug in

____________

Blog: LucD notes

Twitter: lucd22


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

0 Kudos