How to find out number of available Virtual Functions on a Mellanox Card in vCenter Server 8

Today I faced a problem in vSphere where I cannot find the number of used and available Virtual Function on a Mellanox Card.As you see here you can define the maximum number of Virtual Function on a Mellanox card but the detail is not shown in vCenter Server.

With following Powershell command you will be able to find out how many virtual function will be available per vmnic

$esxiHosts = Get-VMHost
foreach ($esxiHost in $esxiHosts) {
$netadapters= Get-VMHostNetworkAdapter -VMHost $esxiHost
foreach ($netadapter in $netadapters) {
$esxcli = Get-EsxCli -VMHost $esxiHost
try {
$totalSriov = ($$ | where { $ -eq $false}).length
if ($?) {
Write-host “the SRIOV is enabled on ” $netadapter.Name ” on the host “$esxiHost “and number of available Virtual function is “$totalSriov

#$output += $totalSriov
else{ Write-host “the SRIOV is NOT enabled on ” $netadapter.Name

}catch {}


And the ouput would be like:

Leave a Reply

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

41 − = 39