MAC is not exposed in VNIC api response in VMWare Aria Operations for Networks
search cancel

MAC is not exposed in VNIC api response in VMWare Aria Operations for Networks

book

Article ID: 398236

calendar_today

Updated On:

Products

VCF Operations for Networks

Issue/Introduction

The MAC address for a given VNIC is not returned via the following API calls:

  • GET https://vrni.example.com/api/ni/entities/vms/
  • GET https://vrni.example.com/api/ni/entities/vnic/
  • GET https://vrni.example.com/api/ni/entities/vms/entity_id
  • GET https://vrni.example.com/api/ni/entities/vnic/entity_id

Environment

VMware Aria Operations for Networks (AON)
VMware vRealize Network Insight (vRNI)

Resolution

This is a known issue affecting VCF Operations for Networks.

Workaround : 

  • Use search API

    curl -X 'POST' \
    'https://<nsxt-ip>/api/ni/search/ql' \
      -H 'accept: application/json' \
      -H 'Authorization: NetworkInsight <token>' \
      -H 'Content-Type: application/json' \
      -d '{
      "query": "Vnic where vm = '\''App-VM-1'\'' group by mac address",
      "size": 10
    }'

****Output

{
  "search_response_total_hits": 2,
  "groupby_response": {
    "results": [
      {
        "bucket": [
          {
          "value": "##:##:##:##:##:##"
          }
        ],
        "count": 1,
        "aggregations": [],
        "series_values": []
      },
      {
        "bucket": [
          {
          "value": "##:##:##:##:##:##"
          }
        ],
        "count": 1,
        "aggregations": [],
        "series_values": []
      }
    ],
    "size": 2,
    "total_bucket": {
      "value": 2,
      "is_approx": false
    },
    "total_count": 2,
    "time_range": {
      "start_time": 1747374461,
      "end_time": 1747374461
    }
  }
}

  • The following VCF Operations UI query can be used, when MAC of specific VNIC is needed

    Vnic where name = '[App-VM-1]-[Network adapter 1]' group by mac address

Additional Information