Array Performance and Data Protection
1819761 Members
2909 Online
109606 Solutions
New Discussion ī„‚

script to set multipathing policies for new ESXi hosts

 
Mamo2k21
Occasional Contributor

script to set multipathing policies for new ESXi hosts

Hi,

Is there a script available to set multipathing policies for new ESXi hosts. We are using VMware 6.7 and shortly we are upgrading to 7.x. I know, we can install NCM to manage. But since we have multiple hosts, we would like to automate by executing scripts, so that we dont have uninstall, manage NCM whenever we perform the ESXi upgrade.

Thanks

 

 

5 REPLIES 5
support_s
System Recommended

Query: script to set multipathing policies for new ESXi hosts

System recommended content:

1. HPE Primera: VMware ESXi Implementation Guide

2. HPE VMware ESXi 7.0 U3 Customized Image Release Notes for October 2022 | HPE VMware ESXi 7.0 U3 Customized Image

 

Please click on "Thumbs Up/Kudo" icon to give a "Kudo".

 

Thank you for being a HPE valuable community member.


Accept or Kudo

Mamo2k21
Occasional Contributor

Re: Query: script to set multipathing policies for new ESXi hosts

Hi,

Thanks for your reply. Is this applicable for Nimble AF series ?

 

Sheldon Smith
HPE Pro

Re: script to set multipathing policies for new ESXi hosts

In the Nimble and HPE Alletra documentation in InfoSight, find the VMware Integration Guide - HPE Alletra 6000 Series - HPE Nimble Storage Flash Arrays for your version of the HPE Alletra OS (aka NimbleOS).
In the chapter on HPE Storage Connection Manager for VMware, see the section HPE Storage Connection Manager Installation Using vSphere Lifecycle Manager When Connected to the Internet.
It leverages vCenter's abilities to update the HPE Storage Connection Manager (aka NCM).


Note: While I am an HPE Employee, all of my comments (whether noted or not), are my own and are not any official representation of the company

Accept or Kudo

dwhickok
HPE Pro

Re: script to set multipathing policies for new ESXi hosts

I use VMware PowerShell CLI. 

To generate a list of hosts and the current policy:

Get-VMHost <host | host with wildcard> | Get-ScsiLun -LunType disk | Where {$_.MultipathPolicy -ne ā€œRoundRobinā€} 

To set the policy use the same command with a little extra at the end:

Get-VMHost <host | host with wildcard> | Get-ScsiLun -LunType disk | Where {$_.MultipathPolicy -ne ā€œRoundRobinā€} | Set-ScsiLun -MultipathPolicy ā€œRoundRobinā€

 

I work for HPE.
PatrickLong
Respected Contributor

Re: script to set multipathing policies for new ESXi hosts

I don't recommend upgrading major versions like that - especially when it comes to 7.x because that version brings major changes with how boot device paritions are configured.  I assume you have checked the VMware HCL to ensure that all your hosts' hardware components and their firmware versions are supported under 7.x?

https://blogs.vmware.com/vsphere/2020/05/vsphere-7-esxi-system-storage-changes.html

https://blogs.vmware.com/vsphere/2020/07/vsphere-7-system-storage-when-upgrading.html

Of course you  *can* upgrade from 6.7 to 7.x, particularly if you use an image profile, but you won't get the benefits of the new boot device formatting described above.  And you should procced with caution if your boot devices are USB-based, either USB sticks OR any USB-controller connected media like an on-motherboard microSD card.

I would recommend you consider the possibility of installing 7.03 from scratch using the latest available custom ESXi installer from your hardware vendor (NOTHING OLDER THAN 7.0.3c, though!!!) and then follow @Sheldon Smith advice above to add the NCM to your VUM/vLCM to get the correct version installed on your hosts, along with the latest ESXi patches.   The latest NCM for ESXi 7.x has two components:

HPE-Storage-Connection-Service 7.0.2-700014 HPE VMwareAccepted
HPE-Storage-psp 7.0.2-700014 HPE VMwareAccepted

You need the Nimble NCM installed on your hosts to properly interact with your Nimble volumes/datastores, otherwise theose disk devices will be claimed by the default SATP VMW_SATP_ALUA and the default PSP configurations for that SATP will be applied to your mounted Nimble volumes on bootup- and you definitely want the Path Selection Policy: NIMBLE_PSP_DIRECTED that comes from the NCM to be applied to those Nimble volumes instead of the default PSP.