This repository contains scripts for synchronizing VMs and LXCs data from Proxmox VE to NetBox Virtual Machines.
proxmox_export.py
generates a JSON file containing Proxmox VE VMs and LXCs.
netbox_import.py
imports data from the JSON file into NetBox. Existing Virtual Machines in NetBox will be updated.
Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate
Install required packages:
pip install -r requirements.txt
Create a .env
file from the example:
cp example.env .env
Edit the .env
file with your configuration values.
Ensure that you created a Device in NetBox for the Proxmox node.
Run the proxmox_export.py
script:
python ./proxmox_export.py
Check the output file proxmox_vms.json
.
Run the netbox_import.py
script:
python ./netbox_import.py