Jul 16 2017

List VMware ESXi vMotion Enabled VMkernel Interfaces Using PowerCLI

A while back during a troubleshooting exercise I created a script to list ESXi host VMKernel Interfaces (vmk) with vMotion enabled since some of the ESXi hosts had vMotion enabled on multiple interfaces. The below information is included per ESXi hosts in the script output CSV file:

  • VMHost – ESXi host Name
  • IP – IP address configured for the VMkernerl Interface (vmk) where vMotion is enabled
  • SubNetMask – Subnet mask configured for the VMkernerl Interface (vmk) where vMotion is enabled
  • PortGroupName – The vSphere VSS or VDS port group the vmk is attached to
  • DeviceName – vmk name
  • VMotionEnabled – Script looking for VMotionEnabled set to True.

The script that was tested using the following software versions:

  • VMware vCenter Server 6.5
  • VMware ESXi 6.5 build 5146846
  • VMware PowerCLI 6.5 Release 1 build 4624819

Below are the 26 first ESXi hosts vMotion configuration

When vMotion is enabled on multiple VMKs there will be one line per VMK interface per ESXi host.

Below is the powercli script screen output which is not that much 🙂

Happy PowerCLI scripting

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">