# creekorful/netbox-pve-sync architecture

> Architecture diagram of the GitHub repository creekorful/netbox-pve-sync, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/creekorful/netbox-pve-sync
- Repository: https://github.com/creekorful/netbox-pve-sync

## Overview

netbox-pve-sync is a script that synchronizes Proxmox VE inventory into NetBox. Its principal workflow is to read PVE cluster and VM information, then create or update corresponding NetBox records; the README also documents tracking VM disks, network interfaces, IPs, prefixes, MACs, VLANs, and pool tags. The sampled source shows VM processing handling interfaces and disks, and interface processing handling prefixes, IP addresses, and VLANs. Several orchestration details are omitted from the excerpts, so those connections rely on README statements rather than claims about unsampled calls.

Main entry points: [`netbox_pve_sync/__init__.py`](https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py) (Sync entrypoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sync["Synchronization"]
  node_entry["Sync entrypoint<br/>[__init__.py]"]
end

subgraph group_compute["Compute Inventory"]
  node_nodes["Node inventory<br/>[__init__.py]"]
  node_pools["Pool tags<br/>[__init__.py]"]
  node_ha["HA and replication<br/>[__init__.py]"]
  node_vms["Virtual machines<br/>[__init__.py]"]
end

subgraph group_network["Network Inventory"]
  node_interfaces["VM interfaces<br/>[__init__.py]"]
  node_ipam["IP and prefixes<br/>[__init__.py]"]
  node_vlans["VLANs<br/>[__init__.py]"]
end

subgraph group_storage["Disk Inventory"]
  node_disks["Virtual disks<br/>[__init__.py]"]
end

node_pve(("Proxmox VE"))
node_netbox[("NetBox")]

node_pve -->|"provides inventory"| node_entry
node_entry -->|"synchronizes records"| node_netbox
node_entry -.->|"processes nodes"| node_nodes
node_entry -.->|"collects pools"| node_pools
node_entry -->|"collects status"| node_ha
node_entry -.->|"processes VMs"| node_vms
node_vms -->|"handles interfaces"| node_interfaces
node_interfaces -->|"creates or updates"| node_ipam
node_interfaces -->|"creates or updates"| node_vlans
node_vms -->|"handles disks"| node_disks
node_pools -->|"creates tags"| node_netbox
node_nodes -->|"updates devices"| node_netbox
node_vms -->|"creates or updates"| node_netbox
node_disks -->|"creates or updates"| node_netbox

click node_entry "https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py"
click node_nodes "https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py"
click node_pools "https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py"
click node_ha "https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py"
click node_vms "https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py"
click node_interfaces "https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py"
click node_ipam "https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py"
click node_vlans "https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py"
click node_disks "https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry toneBlue
class node_nodes,node_pools,node_ha,node_vms,node_netbox toneAmber
class node_interfaces,node_ipam,node_vlans toneMint
class node_disks toneRose
class node_pve toneIndigo
```

## Components

### Synchronization

- [Sync entrypoint](https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py): `netbox_pve_sync/__init__.py`

### Compute Inventory

- [Node inventory](https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py): `netbox_pve_sync/__init__.py`
- [Pool tags](https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py): `netbox_pve_sync/__init__.py`
- [HA and replication](https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py): `netbox_pve_sync/__init__.py`
- [Virtual machines](https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py): `netbox_pve_sync/__init__.py`

### Network Inventory

- [VM interfaces](https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py): `netbox_pve_sync/__init__.py`
- [IP and prefixes](https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py): `netbox_pve_sync/__init__.py`
- [VLANs](https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py): `netbox_pve_sync/__init__.py`

### Disk Inventory

- [Virtual disks](https://github.com/creekorful/netbox-pve-sync/blob/main/netbox_pve_sync/__init__.py): `netbox_pve_sync/__init__.py`

### Other components

- **Proxmox VE**
- **NetBox**

## Connections

- Proxmox VE → Sync entrypoint: provides inventory (evidence: `README.md`)
- Sync entrypoint → NetBox: synchronizes records (evidence: `README.md`)
- Sync entrypoint → Node inventory: processes nodes (evidence: `netbox_pve_sync/__init__.py`)
- Sync entrypoint → Pool tags: collects pools (evidence: `netbox_pve_sync/__init__.py`)
- Sync entrypoint → HA and replication: collects status (evidence: `netbox_pve_sync/__init__.py`)
- Sync entrypoint → Virtual machines: processes VMs (evidence: `netbox_pve_sync/__init__.py`)
- Virtual machines → VM interfaces: handles interfaces (evidence: `netbox_pve_sync/__init__.py`)
- VM interfaces → IP and prefixes: creates or updates (evidence: `netbox_pve_sync/__init__.py`)
- VM interfaces → VLANs: creates or updates (evidence: `netbox_pve_sync/__init__.py`)
- Virtual machines → Virtual disks: handles disks (evidence: `netbox_pve_sync/__init__.py`)
- Pool tags → NetBox: creates tags (evidence: `netbox_pve_sync/__init__.py`)
- Node inventory → NetBox: updates devices (evidence: `netbox_pve_sync/__init__.py`)
- Virtual machines → NetBox: creates or updates (evidence: `netbox_pve_sync/__init__.py`)
- Virtual disks → NetBox: creates or updates (evidence: `netbox_pve_sync/__init__.py`)
