get_segment_port_for_vm
Identify the NSX segment ports connected to a VM by matching its virtual interface attachments. Returns segment and port details for the specified VM display name.
Instructions
[READ] Find which segment(s) a VM is attached to via its VIF attachments.
Looks up the VM in the NSX fabric inventory by display name, fetches its VIFs (/api/v1/fabric/vifs), and matches segment ports whose attachment id equals a VIF's lport_attachment_id. Returns VM info (external_id, host, power state) and matched_ports (segment id/name, port id/name).
Args: vm_display_name: The VM display name as shown in vCenter/NSX inventory. target: Optional NSX Manager target name from config. Uses default if omitted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | ||
| vm_display_name | Yes |