NetBox plugin for viewing and importing VMs from VMware vCenter servers
Project description
NetBox vCenter Server Plugin
A NetBox plugin for viewing and importing VMs from VMware vCenter servers.
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")
}
}
Usage
Syncing VMs from vCenter
- Navigate to Plugins > vCenter Dashboard
- Select a vCenter server from the dropdown
- Enter your username and password
- Click Connect & Sync
- If MFA is enabled, approve the authentication prompt
- VMs will be fetched and cached (data persists until you click Refresh)
Importing VMs to NetBox
- From the VM list, check the boxes next to VMs you want to import
- Click Import Selected to NetBox
- Select the target NetBox cluster
- Click Import
- VMs are created in NetBox with vCPUs, memory, disk, and status
Comparing vCenter with NetBox
- Navigate to Plugins > Compare with NetBox
- Select a vCenter server
- 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\usernameformat) - For self-signed certificates, set
verify_ssl: False - If using MFA/2FA, ensure you approve the authentication prompt promptly
Authentication issues
- Use format
DOMAIN\usernameorusername@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:
License
Apache License 2.0 - See LICENSE for details.
Author
sieteunoseis (@sieteunoseis)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netbox_vcenter_server-0.4.3.tar.gz.
File metadata
- Download URL: netbox_vcenter_server-0.4.3.tar.gz
- Upload date:
- Size: 27.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32ce871c29c2f2adbf1055db6254f92547480df45841506179675682ae872199
|
|
| MD5 |
025db5abafce499b9286d4c0693b1d41
|
|
| BLAKE2b-256 |
a7d9268a90160adfa70fcc14ee9766a9b60c74e7a6d14b59e148924cf27c1742
|
Provenance
The following attestation bundles were made for netbox_vcenter_server-0.4.3.tar.gz:
Publisher:
release.yml on sieteunoseis/netbox-vcenter-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netbox_vcenter_server-0.4.3.tar.gz -
Subject digest:
32ce871c29c2f2adbf1055db6254f92547480df45841506179675682ae872199 - Sigstore transparency entry: 990301213
- Sigstore integration time:
-
Permalink:
sieteunoseis/netbox-vcenter-server@3acd74fe828438a17581c0702d7ade11485293b3 -
Branch / Tag:
refs/tags/v0.4.3 - Owner: https://github.com/sieteunoseis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3acd74fe828438a17581c0702d7ade11485293b3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file netbox_vcenter_server-0.4.3-py3-none-any.whl.
File metadata
- Download URL: netbox_vcenter_server-0.4.3-py3-none-any.whl
- Upload date:
- Size: 30.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6a8b10115c74f0d580b1637abf0dde267b3c2bcbc072c1ec56f0a2cae766bdc
|
|
| MD5 |
e2e760cf3dfa15c01354266c7b8aefd7
|
|
| BLAKE2b-256 |
13b5365a93b94a1fb1915448b73336b557cc96e1271b7de9d6e6e1aef889ba79
|
Provenance
The following attestation bundles were made for netbox_vcenter_server-0.4.3-py3-none-any.whl:
Publisher:
release.yml on sieteunoseis/netbox-vcenter-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netbox_vcenter_server-0.4.3-py3-none-any.whl -
Subject digest:
f6a8b10115c74f0d580b1637abf0dde267b3c2bcbc072c1ec56f0a2cae766bdc - Sigstore transparency entry: 990301323
- Sigstore integration time:
-
Permalink:
sieteunoseis/netbox-vcenter-server@3acd74fe828438a17581c0702d7ade11485293b3 -
Branch / Tag:
refs/tags/v0.4.3 - Owner: https://github.com/sieteunoseis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3acd74fe828438a17581c0702d7ade11485293b3 -
Trigger Event:
push
-
Statement type: