Fork of bb-Ricardo/netbox-sync with extra automation: NetBox cables from ESXi CDP/LLDP neighbors.
Upstream install, config, sources, and pruning still apply. Details specific to this fork are in the next section.
Sources: VMware vCenter
Read the docs carefully before running. This tool writes to NetBox.
During VMware host sync, ESXi physical NICs (vmnic*) expose CDP/LLDP neighbor data (switch + port). Upstream mainly puts that into the interface description. This fork also creates NetBox cables when both ends already exist:
| End | Object |
|---|---|
| A | ESXi interface (vmnic…) |
| B | Switch interface (physical port) |
Prerequisites (required):
- Switches already exist in NetBox (name = CDP/LLDP system name, or the same name without domain).
- Physical ports already exist on those switches.
- ESXi hosts and
vmnic*interfaces exist (normal VMware sync).
No switch or switch port is created by the cable logic—match only.
Flow:
ESXi vmnic → QueryNetworkHint
CDP: systemName or devId (Device ID), portId
LLDP: System Name, Port ID (+ Port Description)
↓
Match NetBox device (FQDN ↔ short name)
Match NetBox interface (long ↔ short port names)
↓
Create cable if both interface IDs exist
Port name aliases (examples): FastEthernet↔Fa, GigabitEthernet↔Gi, TenGigabitEthernet↔Te, TwentyFiveGigE↔Twe/TF, XGigabitEthernet↔XGi.
Cable fields: status connected; type cat5 for FastEthernet/Fa…, else dac-active; description from port description when present; label {server_iface_id}:{switch_iface_id}.
Duplicates between the same two interfaces are skipped. New hosts may get cables on the next run once interface IDs exist in NetBox.