wamatha
Contributor
Contributor

Multipathing

Jump to solution

Hi

Is there a PowerCLI script out there that would change multipathing on an ESXi host to Round Robin, but leave the RDM alone.

The one I saw on these forums changes all the datastores to Round Robin including RDM's. I need RDM to remain on fixed multi pathing

Thank you

0 Kudos
1 Solution

Accepted Solutions
Troy_Clavell
Immortal
Immortal

we use the following script

$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)
  }
}

View solution in original post

0 Kudos
3 Replies
Troy_Clavell
Immortal
Immortal

we use the following script

$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)
  }
}

View solution in original post

0 Kudos
wamatha
Contributor
Contributor

Thank you, will try it out and give a feedback

0 Kudos
dquintana
Virtuoso
Virtuoso

Good Troy. Smiley Happy

Ing. Diego Quintana - VMware Communities Moderator - Co Founder & CEO at Wetcom Group - vEXPERT From 2010 to 2020- VCP, VSP, VTSP, VAC - Twitter: @daquintana - Blog: http://www.wetcom.com-blog & http://www.diegoquintana.net - Enjoy the vmware communities !!!

0 Kudos