hi,
Is there any esxcli command to identify the BMC IP address of the ESXI booted node?
In Linux machine, "ipmitool lan print" will list the IP address of BMC assigned to the node ..
any insights?
Unfortunately there doesn't seem to exist a standard builtin esxcli command to query the management controller IP.
But you can query the local CIM providers from the ESXi shell and get the IP like this:
# enum_instances OMC_IPMIIPProtocolEndpoint root/cimv2 | grep IPv4Address
IPv4Address = 10.2.1.17
What you can also do is querying the host's CIM information remotely, for example like this:
$ curl -sk https://myesxihost.local:5989/cimom --user root -X POST \
-H 'Content-type: application/xml; charset="utf-8"' \
-H 'CIMMethod: EnumerateInstances' \
-H 'CIMOperation: MethodCall' \
-H 'CIMProtocolVersion: 1.0' \
-H 'CIMObject: root/cimv2' \
--data '<?xml version="1.0" encoding="UTF-8"?>
<CIM CIMVERSION="2.0" DTDVERSION="2.0">
<MESSAGE ID="882670" PROTOCOLVERSION="1.0">
<SIMPLEREQ>
<IMETHODCALL NAME="EnumerateInstances">
<LOCALNAMESPACEPATH>
<NAMESPACE NAME="root"/>
<NAMESPACE NAME="cimv2"/>
</LOCALNAMESPACEPATH>
<IPARAMVALUE NAME="ClassName">
<CLASSNAME NAME="OMC_IPMIIPProtocolEndpoint"/>
</IPARAMVALUE>
</IMETHODCALL>
</SIMPLEREQ>
</MESSAGE>
</CIM>' | grep -A1 IPv4Address
Enter host password for user 'root':
<PROPERTY NAME="IPv4Address" TYPE="string">
<VALUE>10.2.1.17</VALUE>
These are generic CIM methods that should work with any standard IPMI device and do not require any special drivers/extensions by a hardware vendor.
Hi,
You need to configure BMC from ESXi, Please follow the steps to configure as below
http://blog.rchapman.org/post/17480234232/configuring-bmc-drac-from-esxi-or-linux
Regards,
Nitesh
What kind of hardware are you running?
On a HP server with ILO you can use the hponcfg utility that comes with the HP utility bundle (e.g. if you installed it with an HP-branded ISO):
# /opt/hp/tools/hponcfg -g
HP Lights-Out Online Configuration utility
Version 4.0-12 (c) Hewlett-Packard Company, 2011
Firmware Revision = 1.51 Device type = iLO 4 Driver name = hpilo
iLO IP Address: 10.2.1.11
Host Information:
Server Name: someesxihost.local
Server Serial Number: xxxxxxxx
Otherwise you probably have to resort to compiling the ipmi binary yourself as explained in the link above.
Thanks for the response!..
I have DELL,Supermicro,IBM server..
is there any ESXCLI command to discover the BMC ip address in In-band. ?
Unfortunately there doesn't seem to exist a standard builtin esxcli command to query the management controller IP.
But you can query the local CIM providers from the ESXi shell and get the IP like this:
# enum_instances OMC_IPMIIPProtocolEndpoint root/cimv2 | grep IPv4Address
IPv4Address = 10.2.1.17
What you can also do is querying the host's CIM information remotely, for example like this:
$ curl -sk https://myesxihost.local:5989/cimom --user root -X POST \
-H 'Content-type: application/xml; charset="utf-8"' \
-H 'CIMMethod: EnumerateInstances' \
-H 'CIMOperation: MethodCall' \
-H 'CIMProtocolVersion: 1.0' \
-H 'CIMObject: root/cimv2' \
--data '<?xml version="1.0" encoding="UTF-8"?>
<CIM CIMVERSION="2.0" DTDVERSION="2.0">
<MESSAGE ID="882670" PROTOCOLVERSION="1.0">
<SIMPLEREQ>
<IMETHODCALL NAME="EnumerateInstances">
<LOCALNAMESPACEPATH>
<NAMESPACE NAME="root"/>
<NAMESPACE NAME="cimv2"/>
</LOCALNAMESPACEPATH>
<IPARAMVALUE NAME="ClassName">
<CLASSNAME NAME="OMC_IPMIIPProtocolEndpoint"/>
</IPARAMVALUE>
</IMETHODCALL>
</SIMPLEREQ>
</MESSAGE>
</CIM>' | grep -A1 IPv4Address
Enter host password for user 'root':
<PROPERTY NAME="IPv4Address" TYPE="string">
<VALUE>10.2.1.17</VALUE>
These are generic CIM methods that should work with any standard IPMI device and do not require any special drivers/extensions by a hardware vendor.
Late reply, but... Note, this is definitely not the exact answer but I recently had the need for the same information. This is a way of mining the BMC IP info from vcenter or the vmhost using powercli that's useful for dumping that info for a whole slew of hosts. I got this from another thread somewhere and I thought it would be a good alternative for this question in case it didn't come up in a similar search:
$vmHostCol = Get-VMHost vmhostnames | |
foreach($h in $vmHostCol) { | |
$hv = $h | Get-View | |
$CIMServicesTicket = $hv.AcquireCimServicesTicket() | |
$Password = ConvertTo-SecureString $CIMServicesTicket.SessionId -AsPlainText -Force | |
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $CIMServicesTicket.SessionId, $Password | |
$CIOpt = New-CimSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck -Encoding Utf8 -UseSsl | |
$Session = New-CimSession -Authentication Basic -Credential $Credential -ComputerName $hv.name -port 443 -SessionOption $CIOpt | |
$ILO = Get-CimInstance -CimSession $Session -ClassName CIM_ServiceAccessPoint | Where {$_.SystemName -match "Management"} | |
Write-Host "ESXi-System: " $ILO.PSComputerName " BMC-IP: " $ILO.IPv4Address | |
} |
Hope this helps.
This answer helped me and was much simpler than any other method. It can also be automated due to being through PowerCLI.
If it were sooner I'd vote this to be the correct answer. Tested with IBM RSA cards.
(Tested with ESXi 6.7)
This works from a command line, and doesn't require Dell HW or any custom VIB. Tested on vanilla Intel SW2600.
Found: Dell - how to get the idrac ip address from vmware esxi
If you have SSH access to the ESXi server, you can try these two that seem to use ipmi on the local machine:
localcli hardware ipmi bmc get
or
esxcli hardware ipmi bmc get
[root@vmhost:~] localcli hardware ipmi bmc get
IpmiBmcConfig:
BMC Firmware Version: 1.56
IPMI Version: 2.0
IPv4 Address: 172.16.0.2
IPv4 Gateway: 172.16.0.1
IPv4 Subnet: 255.255.255.0
IPv6 Addresses:
LAN ifAdminStatus: true
MAC Address: aa:aa:aa:aa:bc
Manufacturer: Intel Corporation
OS Name Reported:
[root@vmhost:~] esxcli hardware ipmi bmc get
BMC Firmware Version: 1.56
IPMI Version: 2.0
IPv4 Address: 172.16.0.2
IPv4 Gateway: 172.16.0.1
IPv4 Subnet: 255.255.255.0
IPv6 Addresses:
LAN ifAdminStatus: true
MAC Address: aa:aa:aa:aa:bc
Manufacturer: Intel Corporation
OS Name Reported:
try below command
esxcli hardware ipmi bmc get
(Also fairly late, but for any Cisco UCS users finding this thread.)
If you have the Cisco UCS Tools (ucs-tool-esxi) VIB installed, which is also included in the Cisco-UCS-Addon-ESXi vLCM vendor add-on.
[root@esxihost:~] /opt/ucs_tool_esxi/ucs_ipmitool lan print
Set in Progress : Set Complete
Auth Type Support : NONE MD2 MD5 PASSWORD
Auth Type Enable : Callback :
: User :
: Operator :
: Admin :
: OEM :
IP Address Source : Static Address
IP Address : 10.0.0.61
Subnet Mask : 255.255.255.0
MAC Address : 34:88:18:d4:7d:nn
SNMP Community String : public
IP Header : TTL=0x40 Flags=0x00 Precedence=0x00 TOS=0x10
BMC ARP Control : ARP Responses Disabled, Gratuitous ARP Disabled
Gratituous ARP Intrvl : 2.0 seconds
Default Gateway IP : 10.0.0.1
Default Gateway MAC : 00:00:00:00:00:00
Backup Gateway IP : 0.0.0.0
Backup Gateway MAC : 00:00:00:00:00:00
802.1q VLAN ID : Disabled
802.1q VLAN Priority : 0
RMCP+ Cipher Suites : 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,128
Cipher Suite Priv Max : XXXaaaXXaaaXaaa
: X=Cipher Suite Unused
: c=CALLBACK
: u=USER
: o=OPERATOR
: a=ADMIN
: O=OEM
None of the generic commands worked for me