Flapoly
Contributor
Contributor

Change multipath setting for VM RDM disk

Jump to solution

Hi,

I'm looking a way to automatically change the multipath setting of all RDM disks (of all VMs)

Do you know how to acheive this.

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

You could try this

# Get all RDMs
$RDMs = Get-VM | Get-HardDisk | where{$_.DiskType -like "Raw*"} | %{$_.ScsiCanonicalName}

# Set multipath to fixed (can also be RoundRobin or MostRecentlyUsed
Get-VMHost | Get-ScsiLun | where {$RDMS -contains $_.CanonicalName} | Set-ScsiLun -MultipathPolicy "Fixed"

____________

Blog: LucD notes

Twitter: lucd22


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

View solution in original post

0 Kudos
1 Reply
LucD
Leadership
Leadership

You could try this

# Get all RDMs
$RDMs = Get-VM | Get-HardDisk | where{$_.DiskType -like "Raw*"} | %{$_.ScsiCanonicalName}

# Set multipath to fixed (can also be RoundRobin or MostRecentlyUsed
Get-VMHost | Get-ScsiLun | where {$RDMS -contains $_.CanonicalName} | Set-ScsiLun -MultipathPolicy "Fixed"

____________

Blog: LucD notes

Twitter: lucd22


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

View solution in original post

0 Kudos