VMware vSphere

 View Only
  • 1.  Using REST API to retrieve a VMs IP address

    Posted Apr 06, 2018 05:16 PM

    I have a nested ESXi VM with VMware tools installed however I cannot find the API call to retrieve it's IP. Is there a way to do this? I can retrieve MAC address, and just about every other piece of info, but no IP :smileysad:

    I've tried:

    https://172.31.1.12/rest/vcenter/vm/



  • 2.  RE: Using REST API to retrieve a VMs IP address

    Posted Apr 07, 2018 03:02 AM

    If you're addressing the REST API through vCenter, you need to use the FQDN of vCenter. If you're not using vCenter, you have no REST API at your disposal.



  • 3.  RE: Using REST API to retrieve a VMs IP address

    Posted Apr 08, 2018 02:53 PM

    Apologies maybe I should have posted the question in vCenter, but I assumed it was the "vSphere REST API". I think the answer is it's not actually possible as per: Get VM API · Issue #21 · vmware/vsphere-automation-sdk-rest · GitHub