Orb worker for discovering Clusters, Hosts, and VMs from System Center Virtual Machine Manager (SCVMM).
Project description
orb-worker-scvmm
This is a custom worker for the NetBoxLabs Orb Agent designed to collect Cluster and VM information from a Microsoft System Center Virtual Machine Manager (SCVMM) instance.
This worker is designed to use WinRM to perform a connection to an SCVMM server which has the PowerShell Module virtualmachinemanager available. Using this remote connection, an attempt to connect to the SCVMM server on localhost occurs, then cluster and VM data are gathered and returned as JSON for processing into Diode entities.
The following NetBox entities may be created or updated from the SCVMM data:
- Clusters
- Virtual Machines
- VM Disks
- VM Interfaces
- IP Addresses (from VM interfaces)
- MAC Addresses (from VM interfaces)
- VLANs (from VM network adapter VLAN IDs)
Requirements
- netboxlabs/diode running and accessible to the orb-agent
- netboxlabs/orb-agent installed and able to communicate with Diode
- A user account with WinRM access and read permissions in SCVMM
- WinRM access to SCVMM server with
virtualmachinemanagerPowerShell Module installed
Usage
- Follow the orb-agent documentation to configure
workers.txtor similar file. - Create an Orb configuration file (example for
scvmm-infra.internal.example.com):
orb:
config_manager:
active: local
backends:
worker:
common:
diode:
target: grpc://netbox.example.com:8080/diode
client_id: ${DIODE_CLIENT_ID}
client_secret: ${DIODE_CLIENT_SECRET}
agent_name: scvmm-worker
policies:
worker:
scvmm-infrastructure:
config:
package: scvmm
scope:
hostname: scvmm-infra.internal.example.com
username: ${SCVMM_USERNAME}
password: ${SCVMM_PASSWORD}
organization_config:
site_mappings:
- code: "hq"
name: "Headquarters"
match_type: "prefix"
- code: "boi"
name: "Boise"
match_type: "prefix"
default_site: "Undefined"
environment_mappings:
- code: "prd"
name: "Production Clusters"
match_type: "prefix"
- code: "dev"
name: "Development Clusters"
match_type: "prefix"
default_group: "Undefined"
vlan_mappings:
- vid: 100
name: "VOIP"
description: "Voice VLAN"
- vid: 200
name: "Data"
description: "Data VLAN"
- Ensure environment variables are set for
${DIODE_CLIENT_ID},${DIODE_CLIENT_SECRET},${SCVMM_USERNAME}, and${SCVMM_PASSWORD}. - Set the Diode branch in NetBox as needed.
- Start the Orb Agent and monitor logs for successful data collection. Example:
docker run --net=host -v ${PWD}:/opt/orb/ -v /etc/ssl/certs:/etc/ssl/certs:ro -e DIODE_CLIENT_ID -e DIODE_CLIENT_SECRET -e SCVMM_USERNAME -e SCVMM_PASSWORD -e INSTALL_WORKERS_PATH=/opt/orb/workers.txt netboxlabs/orb-agent:develop run -c /opt/orb/scvmm.yml
Configuration
The worker supports the following configuration parameters:
hostname(string, required): The hostname or IP address of the SCVMM server to connect to.username(string, required): The username for WinRM & SCVMM authentication.password(string, required): The password for WinRM & SCVMM authentication.winrm_config(object, optional): Custom WinRM connection parameters (port, protocol, transport, path, cert validation).organization_config(object, optional): Mappings for site and environment classification, as well as VLAN ID to NetBox attribute mappings. Supports exact, prefix, and regex matching for cluster names.
See the CONFIG_GUIDE.md for detailed configuration instructions and examples.
Testing
This project includes comprehensive test coverage with a target of 80%+ code coverage. Tests use mocking to avoid requiring actual WinRM connections or SCVMM infrastructure.
Quick Start:
# Run all tests
pytest
# Run with coverage report
pytest --cov=scvmm --cov-report=html --cov-report=term-missing
# Run specific test file or pattern
pytest tests/test_entity_creation.py -v
pytest tests/ -k "vlan" -v
For detailed testing patterns, best practices, mocking strategies, fixture documentation, and contribution guidelines, see DEVELOPMENT.md.
Project details
Release history Release notifications | RSS feed
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 orb_worker_scvmm-0.1.0a5.tar.gz.
File metadata
- Download URL: orb_worker_scvmm-0.1.0a5.tar.gz
- Upload date:
- Size: 10.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 |
1e20d9a178656e01c2033e6cab3c3f300bcca85678a3cff40e6e1816b5840c8b
|
|
| MD5 |
c88a28e0db2b6f4d19147d6fd9a34c91
|
|
| BLAKE2b-256 |
c1c42cf0200b437f401994a44d3b313790c31be22255ca9939df0e1230969049
|
Provenance
The following attestation bundles were made for orb_worker_scvmm-0.1.0a5.tar.gz:
Publisher:
release.yml on Christophoclese/orb-worker-scvmm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
orb_worker_scvmm-0.1.0a5.tar.gz -
Subject digest:
1e20d9a178656e01c2033e6cab3c3f300bcca85678a3cff40e6e1816b5840c8b - Sigstore transparency entry: 1189447133
- Sigstore integration time:
-
Permalink:
Christophoclese/orb-worker-scvmm@0f924b259ecac22ba902b81a034ee18fdbb8c83f -
Branch / Tag:
refs/tags/v0.1.0a5 - Owner: https://github.com/Christophoclese
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0f924b259ecac22ba902b81a034ee18fdbb8c83f -
Trigger Event:
push
-
Statement type:
File details
Details for the file orb_worker_scvmm-0.1.0a5-py3-none-any.whl.
File metadata
- Download URL: orb_worker_scvmm-0.1.0a5-py3-none-any.whl
- Upload date:
- Size: 13.4 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 |
38c00ec300ea8617c53755b02a984d4334004c81985a36a436586c601322e92e
|
|
| MD5 |
7803196e3be4159a703140f208f40a05
|
|
| BLAKE2b-256 |
45eb68ec9e44bc7d9ec8bb535201f13b28833c566e6120665bd3178ef1835d8d
|
Provenance
The following attestation bundles were made for orb_worker_scvmm-0.1.0a5-py3-none-any.whl:
Publisher:
release.yml on Christophoclese/orb-worker-scvmm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
orb_worker_scvmm-0.1.0a5-py3-none-any.whl -
Subject digest:
38c00ec300ea8617c53755b02a984d4334004c81985a36a436586c601322e92e - Sigstore transparency entry: 1189447138
- Sigstore integration time:
-
Permalink:
Christophoclese/orb-worker-scvmm@0f924b259ecac22ba902b81a034ee18fdbb8c83f -
Branch / Tag:
refs/tags/v0.1.0a5 - Owner: https://github.com/Christophoclese
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0f924b259ecac22ba902b81a034ee18fdbb8c83f -
Trigger Event:
push
-
Statement type: