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.7.4 or higher (tested on 4.7.4)
  • Python 3.10+
  • VMware vSphere 7.0+ (tested with vSphere 8.0.3)

Installation

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',
        ],
        # Optional: saved credentials per server, to skip the manual login form.
        # Intended for a dedicated read-only service account that does not require
        # MFA - servers without an entry here still show the manual login form
        # (e.g. for MFA-enabled accounts).
        'vcenter_credentials': {
            'vc-server1.example.com': {
                'username': 'svc-netbox@vsphere.local',
                'password': 'changeme',
            },
        },
        # 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
        # Sync vCenter VM Notes into comments of *existing* VMs (overwrites when they differ).
        # New imports always use the VM's Notes as comments when present.
        'sync_vm_notes': False,
        # Name of a Virtual Machine custom field (Text) to fill with the vCenter guest OS,
        # e.g. "Microsoft Windows Server 2022 (64-bit)". Create the custom field first.
        'guest_os_custom_field': '',
    }
}

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).

A VM's vCenter Notes become the NetBox comments of newly imported VMs. Set sync_vm_notes to also push Notes changes to existing VMs (via "update existing VMs" on import, or "Sync All Differences").

For the operating system, either map the vCenter guest OS to a NetBox Platform with platform_mappings, or create a Text custom field on Virtual Machine and set guest_os_custom_field to its name to store the guest OS string as-is.

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?)
    • Differences - VMs with mismatched vCPUs, memory, disk, or primary IP (and Notes, when sync_vm_notes is enabled)
  4. Sync All Differences updates those VMs in NetBox; a changed primary IP also re-syncs the VM's interfaces/IPs and repoints its primary IP (the old IP record is left in IPAM)

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)

Metadata

Release files for netbox-vcenter-server 0.7.0

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.7.0
File Size Uploaded Provenance Actions
netbox_vcenter_server-0.7.0.tar.gz 35.4 kB With provenance Details for netbox_vcenter_server-0.7.0.tar.gz

Built distribution (wheel)

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

Total release size: 72.3 kB

Release files / netbox_vcenter_server-0.7.0.tar.gz

Download URL netbox_vcenter_server-0.7.0.tar.gz
Size 35.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ed96837f6ae9ed808372e17c66eed29aef5195bf7e72ea8ff46e328980640362
BLAKE2b-256 checksum
How to use checksums
dea39189a835b481ac1dbc851013ecc74fbfa8a1355d4a7e7f27b83cbcfcc233
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

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

Download URL netbox_vcenter_server-0.7.0-py3-none-any.whl
Size 36.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
838bee1ff0282b31387cd34e2f47da5ed00efadc90b57c50829219f322275c60
BLAKE2b-256 checksum
How to use checksums
ed8e8b5915fa4bd4e63ce41f6df7e4c2dc46ca623ad70c56706a3642ac2efca5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Security for netbox-vcenter-server 0.7.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for netbox_vcenter_server-0.7.0.tar.gz

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 Nov 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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