<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get multiple IPs from VM using vSphere REST API in VMware{code} Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-code-Discussions/Get-multiple-IPs-from-VM-using-vSphere-REST-API/m-p/2939982#M2125</link>
    <description>&lt;P&gt;List Guest Networking Interfaces in the guest operating system.&lt;BR /&gt;GET:&amp;nbsp;&lt;A href="https://{api_host}/api/vcenter/vm/{vm}/guest/networking/interfaces" target="_blank" rel="noopener"&gt;https://{vCenter}/api/vcenter/vm/{vm}/guest/networking/interfaces &lt;/A&gt;&lt;/P&gt;&lt;P&gt;It lists the nic-wise ip_addresses and its mac_address.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sample program to print the Virtual machine network details(Nic name, IPv4, Mac, Nic Key, Portgroup) using VI java API(vSphere Management SDK). -&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://github.com/doskiran/vSphereJavaAPIScripts/blob/master/PrintVMNetworkDetails.java" target="_self" rel="nofollow noopener noreferrer"&gt;PrintVMNetworkDetails.java&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Output:&lt;/P&gt;&lt;PRE&gt;Network Adatpter     IP4Address         Mac                  Key      Portgroup                                                                                         
----------------     ----------         ---                  ---      ---------                                                                                       
Network adapter 1    10.10.10.6         00:15:23:31:c9:22    4000     VM Network                                                                                       
Network adapter 2    10.20.20.7         07:89:61:14:38:66    4001     dvPortgroup                                                                                       &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Nov 2022 11:32:03 GMT</pubDate>
    <dc:creator>doskiran</dc:creator>
    <dc:date>2022-11-22T11:32:03Z</dc:date>
    <item>
      <title>Get multiple IPs from VM using vSphere REST API</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/Get-multiple-IPs-from-VM-using-vSphere-REST-API/m-p/2937419#M2104</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I'm trying to retrieve a VM's IPs using REST API request. The only request that seems to be relevant is:&lt;BR /&gt;&lt;SPAN&gt;/api/vcenter/vm/{vm}/guest/identity&lt;BR /&gt;&lt;/SPAN&gt;but its response contains only one IP address while the VM has more than one.&lt;BR /&gt;Is there any way to get all the IP addresses of a VM?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 09:13:16 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/Get-multiple-IPs-from-VM-using-vSphere-REST-API/m-p/2937419#M2104</guid>
      <dc:creator>noamcoh</dc:creator>
      <dc:date>2022-11-09T09:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Get multiple IPs from VM using vSphere REST API</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/Get-multiple-IPs-from-VM-using-vSphere-REST-API/m-p/2939982#M2125</link>
      <description>&lt;P&gt;List Guest Networking Interfaces in the guest operating system.&lt;BR /&gt;GET:&amp;nbsp;&lt;A href="https://{api_host}/api/vcenter/vm/{vm}/guest/networking/interfaces" target="_blank" rel="noopener"&gt;https://{vCenter}/api/vcenter/vm/{vm}/guest/networking/interfaces &lt;/A&gt;&lt;/P&gt;&lt;P&gt;It lists the nic-wise ip_addresses and its mac_address.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sample program to print the Virtual machine network details(Nic name, IPv4, Mac, Nic Key, Portgroup) using VI java API(vSphere Management SDK). -&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://github.com/doskiran/vSphereJavaAPIScripts/blob/master/PrintVMNetworkDetails.java" target="_self" rel="nofollow noopener noreferrer"&gt;PrintVMNetworkDetails.java&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Output:&lt;/P&gt;&lt;PRE&gt;Network Adatpter     IP4Address         Mac                  Key      Portgroup                                                                                         
----------------     ----------         ---                  ---      ---------                                                                                       
Network adapter 1    10.10.10.6         00:15:23:31:c9:22    4000     VM Network                                                                                       
Network adapter 2    10.20.20.7         07:89:61:14:38:66    4001     dvPortgroup                                                                                       &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 11:32:03 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/Get-multiple-IPs-from-VM-using-vSphere-REST-API/m-p/2939982#M2125</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2022-11-22T11:32:03Z</dc:date>
    </item>
  </channel>
</rss>

