What is Multipathing and policies in ESXi


Multipathing in ESXi, which is a VMware virtualization platform, is a crucial feature that plays a key role in ensuring the high availability and reliability of data storage. ESXi hosts typically connect to storage devices like SAN (Storage Area Network) through multiple physical paths, such as Fibre Channel or iSCSI connections.

Multipathing in ESXi helps in two main ways:

  1. Redundancy: It provides redundancy by creating multiple paths between the ESXi host and the storage. If one path fails due to hardware issues or network problems, ESXi can automatically switch to an alternate path, ensuring that data access remains available.
  2. Load Balancing: Multipathing also enables load balancing of data traffic. It distributes data across multiple paths, preventing any single path from becoming overloaded. This helps improve performance and efficiency.

Multipath Policies

In ESXi virtualization, multipath policies are crucial for optimizing data traffic distribution across multiple physical paths. These policies determine how ESXi selects paths for I/O (input/output) operations, balancing performance and ensuring high availability. Let’s explore the three primary multipath policies in ESXi:

  1. Fixed Policy:
    • The Fixed Policy designates a single preferred path for all I/O operations. This policy is ideal for scenarios where specific paths need to be prioritized, such as routing critical workloads through a specific path.
    • If the preferred path remains functional, ESXi will exclusively use it for I/O operations.
    • In the event of a preferred path failure, ESXi will automatically switch to an alternative path, ensuring continued data flow without interruption.
  2. Most Recently Used (MRU) Policy:
    • The Most Recently Used (MRU) Policy selects the path that was most recently used for I/O operations. While this approach may not distribute the load evenly, it is suitable for certain workloads.
    • The MRU policy provides a simple way to maintain some level of balance in path selection without incurring additional complexity.
    • In case of a path failure, ESXi will switch to the most recently used path, aiming to minimize any disruption to ongoing operations.
  3. Round Robin (RR) Policy:
    • The Round Robin (RR) Policy is designed to evenly distribute I/O operations across all available paths, enhancing load balancing.
    • It is recommended for environments where balanced resource utilization is a priority. RR ensures that all available paths share the I/O load equally.
    • In the event of a path failure, ESXi will automatically switch to the next available path, maintaining both load balancing and failover capabilities.

In summary, these multipath policies allow you to customize how ESXi handles data traffic, optimizing performance and resilience according to your specific needs. The choice of policy should align with your virtualization environment’s objectives, ensuring that it operates efficiently and reliably.

Multipathing PowerShell Script

Usually, when the storage team is about to do a firmware upgrade or any task related to our storage systems, we need to ensure that the Multipath status is all good. Now, you could manually check the Multipath status on your ESXi settings, but if you’re dealing with a large environment or have numerous ESXi hosts, this task can quickly become boring and tedious. That’s why we’ve come up with this handy script – it’s here to simplify your life!


# Connect to the vCenter server
Connect-VIServer -Server “vCenter IP”

# Read a list of ESXi host names from a file
$esxNames = Get-Content -Path C:tempesxiname.txt

# Create an empty report
$report = foreach ($esx in Get-VMHost -Name $esxNames) {
# Get the ESXCLI for the ESXi host
$esxcli = Get-EsxCli -VMHost $esx -V2

# Loop through FC (Fibre Channel) adapters
foreach ($adapter in $esxcli.storage.core.adapter.list.Invoke() | where { $_.Driver -match ‘fc’ }) {
# Get information about storage paths
$esxcli.storage.core.path.list.Invoke() | where { $_.Adapter -eq $adapter.HBAName } |
Group-Object -Property Device |
Select-Object @{
Name = ‘VMHost’
Expression = { $esx.Name }
Name = ‘HBA’
Expression = { $adapter.HBAName }
Name = ‘Device’
Expression = { $_.Name }
Name = ‘Path#’
Expression = { $_.Group.Count }
Name = ‘PathStatus’
Expression = { ($_.Group.State | Sort-Object -Unique) -join ‘,’ }

# Export the report to a CSV file
$report | Export-Csv -Path C:tempMultipathreport.csv -NoTypeInformation -UseCulture

This script connects to a vCenter server, reads a list of ESXi host names from a file, collects information about Fibre Channel (FC) adapters and storage paths on these hosts, and then exports the gathered data to a CSV file.

VMware Mastery

Hi, I've been working with Windows, VMware and Cloud technologies for more than 12 years. I love delving into the exciting realm of technology and enjoy sharing my knowledge with others. I write about IT and Technology, covering both technical and non-technical topics.

Leave a Reply