Tool for converting EVE-ng labs into Containerlab topologies
Find a file
2026-10-27 23:36:11 +01:00
src/eve_clab_converter . 2026-10-27 23:36:11 +01:00
tests . 2026-10-27 23:36:11 +01:00
.gitignore Initial commit 2026-10-25 21:56:56 +01:00
pyproject.toml Initial commit 2026-10-25 21:56:56 +01:00
README.md . 2026-10-27 23:36:11 +01:00
uv.lock Initial commit 2026-10-25 21:56:56 +01:00

eve-clab-converter

Convert EVE-NG .unl labs to containerlab: nodes, links, external clouds, all config sets, and the canvas (node positions, text, shapes, lines) as a VS Code TopoViewer annotation file. Deploying the result needs containerlab and the vrnetlab images listed in the report.

uv run eve-clab-converter lab.unl -o out/
uv run eve-clab-converter ~/eve-labs/ -o out/          # whole tree of .unl / EVE .zip exports
uv run eve-clab-converter lab.unl -m my-mapping.yml --default-set "L3 Base"

Per lab, out/<lab>/ contains:

File What
<lab>.clab.yml topology; EVE interface names as comments on each link
<lab>.clab.yml.annotations.json TopoViewer layout: node positions/icons, text (as Markdown), rectangles, ellipses, lines
configs/<set>/<node>.cfg one directory per EVE config set (default = EVE Default set)
conversion-report.md deploy commands, images and host bridges needed, config-set coverage, warnings

EVE networks with more than two members, and pnetN clouds, become Linux bridges that must exist on the host; the report has the commands to create them.

Config sets

Every node points at configs/${CONFIGSET:=default}/<node>.cfg, so pick a set at deploy time:

CONFIGSET=ospfv3 sudo -E containerlab deploy -t <lab>.clab.yml

When a set doesn't include a node, the node gets its Default-set config instead.

Interfaces

Links use ethN = EVE interface id + eth_offset. EVE's interface id is the VM's NIC index, and vrnetlab reserves the first NIC for management, so most platforms use offset 0 and keep their interface names. Links on that first port (vios Gi0/0, CSR Gi1, ...) are dropped and listed in the report. c8000v can boot without management, so it runs with network-mode: none and keeps Gi1. IOL keeps every port: management moves to a spare slot.

44 EVE templates are mapped; see default_mapping.yml for the list and the ones left out.

Mapping

src/eve_clab_converter/default_mapping.yml maps EVE templates to kind/type/image/network-mode/offset, EVE icons to TopoViewer icons, and EVE pnetN networks to host bridges or macvlan. -m my-mapping.yml is deep-merged on top, e.g.:

templates:
  c8000v: {image: "registry.local/c8000v:17.09"}
  iol: {kind: cisco_iol, image: "vrnetlab/cisco_iol:17.12", eth_offset: 1, icon: pe}
external:
  pnet2: {mode: macvlan, host-interface: ens19}

Not carried over

Per-link colours/styles and curved lines (TopoViewer has neither; the report lists them), EVE CPU/RAM sizing (in the report, not applied), serial interfaces.