doskiran
Enthusiast
Enthusiast

List Guest Networking Interfaces in the guest operating system.
GET: https://{vCenter}/api/vcenter/vm/{vm}/guest/networking/interfaces

It lists the nic-wise ip_addresses and its mac_address.

Sample program to print the Virtual machine network details(Nic name, IPv4, Mac, Nic Key, Portgroup) using VI java API(vSphere Management SDK). - PrintVMNetworkDetails.java


Output:

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                                                                                       

 

View solution in original post

Reply
0 Kudos