Skip to main content

NetBox vCenter Server Plugin

NetBox vCenter Server Plugin

A NetBox plugin for viewing and importing VMs from VMware vCenter servers.

NetBox Version Python Version vSphere Version License PyPI

Features

  • Multi-vCenter Support - Connect to multiple vCenter servers (cached separately)
  • VM Dashboard - View all VMs from vCenter with power state, vCPUs, memory, and disk
  • VM Import - Import VMs from vCenter into NetBox with one click
  • Comparison View - Compare vCenter VMs with NetBox to find differences
  • Manual Cache Control - Data persists until you click Refresh
  • MFA/2FA Support - Works with environments requiring multi-factor authentication

Requirements

  • NetBox 4.0 or higher
  • Python 3.10+
  • VMware vSphere 7.0+ (tested with vSphere 8.0.3)

Installation

From PyPI (recommended)

pip install netbox-vcenter-server

From Source

git clone https://github.com/sieteunoseis/netbox-vcenter-server.git
cd netbox-vcenter-server
pip install -e .

Docker Installation

Add to your NetBox Docker requirements file:

# requirements-extra.txt
netbox-vcenter-server

Configuration

Add the plugin to your NetBox configuration:

# configuration.py or plugins.py

PLUGINS = [
    'netbox_vcenter',
]

PLUGINS_CONFIG = {
    'netbox_vcenter': {
        # Required: List of vCenter servers to choose from
        'vcenter_servers': [
            'vc-server1.example.com',
            'vc-server2.example.com',
        ],
        # Connection settings
        'timeout': 60,       # Timeout for vCenter connections (seconds)
        'verify_ssl': False, # SSL verification (False for self-signed certs)
        # MFA/2FA settings (optional)
        'mfa_enabled': True,  # Show MFA warning in UI
        'mfa_label': 'MFA',   # Label shown in UI (e.g., "Duo", "2FA", "MFA")
        'mfa_message': 'Check your authenticator after clicking Connect & Sync.',
        # Name matching for duplicate detection
        # Options: "exact" (full name), "hostname" (strip domain), "regex"
        'name_match_mode': 'hostname',
        'name_match_pattern': r'^([^.]+)',  # Used with "regex" mode
        # Import settings
        'normalize_imported_name': True,  # "WebServer01.example.com" -> "webserver01"
        'default_tag': '',      # Tag slug to apply (e.g., "vcenter-sync")
        'default_role': '',     # Role slug (e.g., "server")
        'default_platform': '', # Platform slug (e.g., "vmware")
        'default_vrf': '',      # VRF name to scope IP dedup/creation (e.g., "management")
        'default_tenant': '',   # Tenant slug applied to IP addresses created during import
    }
}

All of a VM's network adapters are synced, not just the primary one: each becomes a NetBox VMInterface named to match vSphere's own adapter number (vSphere's "Network Adapter 1" becomes NetBox interface eth1), with its MAC address, connected/enabled state, and IP addresses attached. IP lookups reuse an existing IPAM record for the address whenever one already exists (regardless of its prefix length), instead of creating a duplicate /32. When a new record does need to be created, its prefix length is derived from the most specific containing NetBox Prefix. Set default_vrf if you use VRFs, so lookups and new records stay scoped to the correct one; set default_tenant to tag newly created IP addresses with a tenant. Per-interface MTU is not synced yet (vSphere reports this at the vSwitch/portgroup level, not directly on the adapter).

Each of a VM's hard disks is also synced as a NetBox VirtualDisk (name and size). Disks and interfaces removed from a VM in vCenter are left in place in NetBox rather than deleted.

Usage

Syncing VMs from vCenter

  1. Navigate to Plugins > vCenter Dashboard
  2. Select a vCenter server from the dropdown
  3. Enter your username and password
  4. Click Connect & Sync
  5. If MFA is enabled, approve the authentication prompt
  6. VMs will be fetched and cached (data persists until you click Refresh)

Importing VMs to NetBox

  1. From the VM list, check the boxes next to VMs you want to import
  2. Click Import Selected to NetBox
  3. Select the target NetBox cluster
  4. Click Import
  5. VMs are created in NetBox with vCPUs, memory, disk, and status

Comparing vCenter with NetBox

  1. Navigate to Plugins > Compare with NetBox
  2. Select a vCenter server
  3. View:
    • Only in vCenter - VMs that can be imported
    • Only in NetBox - VMs not found in vCenter (orphaned?)
    • Spec Differences - VMs with mismatched vCPUs, memory, or disk

Screenshots

Coming soon

Troubleshooting

Connection errors

  • Verify vCenter hostname is reachable from the NetBox server
  • Check that credentials are correct (use domain\username format)
  • For self-signed certificates, set verify_ssl: False
  • If using MFA/2FA, ensure you approve the authentication prompt promptly

Authentication issues

  • Use format DOMAIN\username or username@domain
  • Ensure the account has at least read-only access to vCenter

Development

Setup

git clone https://github.com/sieteunoseis/netbox-vcenter-server.git
cd netbox-vcenter-server
pip install -e ".[dev]"

Code Style

black netbox_vcenter/
isort netbox_vcenter/
flake8 netbox_vcenter/

Changelog

See CHANGELOG.md for release history.

Support

If you find this plugin helpful, consider supporting development:

Buy Me A Coffee

License

Apache License 2.0 - See LICENSE for details.

Author

sieteunoseis (@sieteunoseis)

Release files for netbox-vcenter-server 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netbox-vcenter-server 0.5.1
File Size Uploaded
netbox_vcenter_server-0.5.1.tar.gz 31.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for netbox-vcenter-server 0.5.1
File Interpreter ABI Platform
netbox_vcenter_server-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 65.1 kB

Release files / netbox_vcenter_server-0.5.1.tar.gz

Download URL netbox_vcenter_server-0.5.1.tar.gz
Size 31.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ffbc5d49b665dd606dcfd10f6862a4101be9b32f8a9fac30ecf8c973b96e5c48
BLAKE2b-256 checksum
How to use checksums
8223ffb6df15c235709ef1c957bc080b0f0918d3f2455ea528e842640528d217
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Release files / netbox_vcenter_server-0.5.1-py3-none-any.whl

Download URL netbox_vcenter_server-0.5.1-py3-none-any.whl
Size 33.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7285344f6231ba0c697659766b0d620abbf9729cbb60dbce681a3f1c7256a14
BLAKE2b-256 checksum
How to use checksums
b98f16333c7bc8e97f8521a0719f6cd38081b9b21f65fe6203469a6a937ec6bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.1

2 release files

0.6.0

2 release files

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page