Fetching Vmotion IP address for ESXi hosts

Most of the cases we use private IP addresses for vmotion vmkernel. Sometimes we run into IP conflict , which cause issues with vmotion. Here i am going to share script to pull vmotion IP details for your environment.

Connect-VIServer vcsa65
$vmhosts = @(Get-VMHost)
$Results = @()
$Results = foreach ($vmhost in $vmhosts)
 {
$vmhost | Get-VMHostNetworkAdapter -VMKernel | Where-Object {$_.vMotionEnabled} | select Name,VMhost,Mac,IP,Mtu,SubnetMask
}
$Results | export-csv F:script_outputvmotion_ip.csv

Leave a Reply

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

%d bloggers like this: