vSphere

  • 1.  How to find ESX Host (VMHost) IpAddress?

    Posted Feb 09, 2012 12:48 PM

    Hi,

    How to find ipaddresses of ESX Hosts (VMHosts) in a vcenter?

    I have looked at the http://communities.vmware.com/message/780627#780627 as its related.

    So i looked at the config.network proeprty but couldnt find the ipaddress of the host.

    Looks like I am missing something obvious.

    Can you help me find the actual property?

    Regards,

    Dreamer



  • 2.  RE: How to find ESX Host (VMHost) IpAddress?

    Posted Feb 09, 2012 03:30 PM

    The ip addresses of the virtual nics for a host are buried in the networkInfo property of the HostSystem.

    configManager.networkSystem.networkInfo.vnic[].spec.ip.ipAddress

    I just looked at your image and it looks like you should be using configManager.networkSystem.networkInfo.consoleVnic[].spec.ip.ipAddress instead.



  • 3.  RE: How to find ESX Host (VMHost) IpAddress?

    Posted Feb 09, 2012 04:49 PM

    The problem with just going to config.network.vnic[] is that you will not know what vnic type it is (management, vmotion, etc).

    The best solution is to use QueryNetConfig from HostVirtualNicManager.  Use 'management' for the nicType (I'm assuming you want the management ip).  That will return a list of HostVirtualNic[].  You can get the vmk device, mac and ip address quickly this way and it will support configurations where you have multiple management interfaces.



  • 4.  RE: How to find ESX Host (VMHost) IpAddress?

    Posted Feb 10, 2012 06:40 AM

    Thank you.

    I think it should work. I was able to look at the ipaddress in object browser.

    I will give it a try and update you.

    Regards,

    Dreamer



  • 5.  RE: How to find ESX Host (VMHost) IpAddress?

    Posted Feb 10, 2012 07:10 AM

    Hi,

    There are two option from where you can get the Host IP address.

    1)  Go to Home --> Inventory --> Host and Cluster -->  Configuration --> Networking --> Management Network Ip is your  host IP

                                                      OR

    2) If you have database access of VCenter then you can run the below query

              select DNS_NAME,IP_ADDRESS from dbo.VPX_HOST



  • 6.  RE: How to find ESX Host (VMHost) IpAddress?

    Posted Feb 14, 2023 02:23 AM

    I followed the below article to get vCenter IP details on Esxi host 

     

    https://vmkfix.blogspot.com/2023/02/how-to-check-vcenter-ip-address-on-esxi.html