How to change all storage paths of all datastores on a host in VCenter

vmware_view_pilot-5132020[1]This will only work once a host has been added to Vcenter.

Use Vmware CLI to run this with the variables in Square Brackets edited out

This will change from Multipath to Round Robin

Connect-VIServer [VCENTER-SERVER-ADDRESS]
 
$hostview = Get-View -Viewtype HostSystem  –filter @{“Name”=[Fully qualified name of server]}
$storageSystem = Get-View $hostview.ConfigManager.StorageSystem 
$policy = new-object VMware.Vim.HostMultipathInfoLogicalUnitPolicy
#$policy.policy = "VMW_PSP_MRU" 
$policy.policy = "VMW_PSP_RR"
$storageSystem.StorageDeviceInfo.MultipathInfo.lun | foreach { $storageSystem.SetMultipathLunPolicy($_.ID, $policy) }
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Tags: change, datastores, power cli, powershell, round robin, storage paths, Vmware

Trackback from your site.