Skip to content

A NetBox plugin to extract VM and VMInterface information from Proxmox.

Notifications You must be signed in to change notification settings

mvrp21/netbox-proxmox-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proxmox to NetBox Integration Plugin

This is a NetBox plugin that fetches information from a Proxmox server and imports it into NetBox. It simply imports the data over nicely.

Features

  • Imports virtual machines (and their interfaces) from Proxmox into NetBox.
  • Supports synchronization of multiple clusters.
  • Complete management through the UI.
  • Automatically updates device and node information at regular intervals (maybe? I'll see about that).

Compatibility

NetBox Version Plugin Version
4.1.x 1.0.0
4.2.x 1.1.0

Installation

Regular plugin install.

  1. Clone the repository and install:
cd /opt/netbox
sudo ./venv/bin/python3 netbox/manage.py makemigrations netbox_proxmox_import
sudo ./venv/bin/python3 netbox/manage.py migrate
  1. Add the plugin to the PLUGINS netbox configuration:
PLUGINS = ['netbox_proxmox_import']
  1. Restart NetBox and apply migrations:
sudo systemctl restart netbox
cd /opt/netbox
sudo ./venv/bin/python3 netbox/manage.py migrate netbox_proxmox_import

And that's it!

Usage

Create your virtualization cluster as you would normally.

This plugin adds a model called ProxmoxCluster, which stores the actual connection configuration to your Proxmox clusters. Access this page via the path /plugins/nbp-sync/proxmox-connections or using the sidebar, under "Plugins".

Proxmox Connections Showcase

Each cluster connection gets its own configuration.

The current configuration options are:

  • Domain (required): URL to access the Proxmox cluster (check your firewall and DNS!).
  • User (required): Username to access the Proxmox API.
  • Access Token (required): Token for this user to use the Proxmox API.
  • Cluster (required): The actual cluster in NetBox this Proxmox connection will be associated to.

Caution

Use a read-only Proxmox user! This plugin DOES NOT send writes to Proxmox!

Sidebar Showcase

After that you'll have a nice interface /plugins/nbp-sync/proxmox-connections/<connection_id>, from where you can manually synchronize the information.

VM Showcase

It will also show what has changed and also inform you of any warnings or errors.

VMInterface Showcase

Note

The first sync generally takes the longest, as no information is present yet on NetBox, so we create everything.

This plugin was tested on a 2 core 2GB VM with pretty standard RBD configuration, and the initial sync of ~140 VMs and ~170 VMInterfaces took roughly 70 seconds.

About

A NetBox plugin to extract VM and VMInterface information from Proxmox.

Resources

Stars

Watchers

Forks

Packages

No packages published