Press "Enter" to skip to content

ESXi CLI Commands Network and HBA

Get list of NICs

esxcli network nic list

Check the status of active network connections

esxcli network ip connection list

Get driver and firmware version

esxcli network nic get -n <vmnic#>

Get the name of the HBAs

/usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval -d

Get driver and firmware information

/usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval -l -i <vmhba#>/<hba type> | head -20


Ex: /usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval -l -i vmhba4/qlogic | head -20


Get HBA driver name and version

for a in $(esxcfg-scsidevs -a |awk '{print $2}') ;do echo $a; vmkload_mod -s $a |grep -i version ;done

Get VID & DID for HBA

for name in `vmkchdev -l | grep vmhba | awk '{print$5}'`;do echo $name ; echo “VID :DID SVID:SDID”; vmkchdev -l | grep $name | awk '{print $2 , $3}';printf “Driver: ”;echo `esxcfg-scsidevs -a | grep $name |awk '{print $2}'`;vmkload_mod -s `esxcfg-scsidevs -a | grep $name|awk '{print $2}'` |grep -i version;echo `lspci -vvv | grep $name | awk '{print $1=$NF=“”,$0}'`;printf “\n”;done

Get VID & DID for vmnic

for name in `vmkchdev -l | grep vmnic | awk '{print$5}'`;do echo $name ; echo “VID :DID SVID:SDID”; vmkchdev -l | grep $name | awk '{print $2 , $3}';printf “Driver: ”;echo `esxcfg-scsidevs -a | grep $name |awk '{print $2}'`;vmkload_mod -s `esxcfg-scsidevs -a | grep $name|awk '{print $2}'` |grep -i version;echo `lspci -vvv | grep $name | awk '{print $1=$NF=“”,$0}'`;printf “\n”;done

Was this page helpful?