Finding VM with Fixed or Round Robin MultiPath Policy

0

Finding VM with Fixed or Round Robin MultiPath Policy

Objective: In some cases we need to change the Path Selection from RoundRobin to Fixed or vice versa, It is quite difficult to check each VM and change their RDM path policy.

VM RDM Path Selection

 

Solution: A Simple script using VMware PowerCLI can get the list of VMs which are using Fixed or RoundRobin Selection Path .

1-Find all VMs with Fixed Selection Path

Get-VM | Get-HardDisk | Where-Object {$_.DiskType -like “Raw*”} | Where-Object {$_.MultipathPolicy -notlike “RoundRobin”} | Select @{N=”VMName”;E={$_.Parent}},Name

2-Find all VMs with RoundRobin Selection Path

Get-VM | Get-HardDisk | Where-Object {$_.DiskType -like “Raw*”} | Where-Object {$_.MultipathPolicy -notlike “Fixed”} | Select @{N=”VMName”;E={$_.Parent}},Name

You can export list to CSV format bu using

| Export-Csv C:\RDM-list.csv -NoTypeInformation

Output:

VMName Name
VM1 Hard disk 13
VM2 Hard disk 4
VM3 Hard disk 7
VM4 Hard disk 1

 

Leave A Reply

Your email address will not be published.