Skip to main content

CloudStack Proxmox VE Extension

Tests PyPI Python versions

An Apache CloudStack Orchestrator extension that manages virtual machines on Proxmox VE.

CloudStack invokes the extension as a command line program, passing an action and the path to a JSON payload; the extension talks to the Proxmox API and writes a single JSON document to stdout. Everything is implemented on top of the Python standard library, so the extension has no runtime dependencies and runs with the management server's system interpreter.

Installation

pip install cloudstack-extension-proxmox-ngine

This provides the cloudstack-extension-proxmox command. CloudStack expects to find an executable inside the extension directory, so link the command into place:

mkdir -p /usr/share/cloudstack-management/extensions/Proxmox-Ngine
ln -s "$(command -v cloudstack-extension-proxmox)" \
      /usr/share/cloudstack-management/extensions/Proxmox-Ngine/proxmox.sh

Register the extension in CloudStack (ExtensionsAdd Extension, type Orchestrator) and add the Proxmox connection details as extension or host details.

Usage

cloudstack-extension-proxmox <action> <payload.json> [timeout-seconds]
Action Description
prepare Reserve the next free VM ID and return it as proxmox_vmid
create Clone a template or install from an ISO, attach the NICs and start the VM
start, stop, reboot, delete Power and lifecycle operations
status, statuses Power state of one VM, or of every VM on the node
getconsole Issue a one time VNC ticket for the console proxy
listsnapshots, createsnapshot, restoresnapshot, deletesnapshot Snapshot management

stop and delete are idempotent: a VM that no longer exists is reported as success.

Payload

The payload is written by CloudStack. The fields the extension reads are:

Path Meaning
externaldetails.host.url / .extension.url Proxmox API base URL (host wins)
externaldetails.host.user, .token, .secret API token credentials
externaldetails.host.node Proxmox node name
externaldetails.host.network_bridge Bridge the VM NICs attach to
externaldetails.host.verify_tls_certificate Verify the API certificate (default true)
externaldetails.virtualmachine.template_type ISO or anything else for a template clone
externaldetails.virtualmachine.template_id Template VM ID to clone
externaldetails.virtualmachine.iso_path, .iso_os_type, .disk_size_gb ISO installation
externaldetails.virtualmachine.storage, .is_full_clone Storage and clone mode
cloudstack.vm.details VM name, CPU, memory and NICs from the service offering
parameters.snap_name, .snap_description, .snap_save_memory Snapshot action inputs

As a library

from cloudstack_extension_proxmox_ngine import ProxmoxManager

manager = ProxmoxManager.from_config_file("payload.json")
print(manager.status())
# {'status': 'success', 'power_state': 'poweron'}

Operations return the CloudStack result document and raise ProxmoxError on failure.

Development

The project uses uv:

uv sync --group dev
uv run pytest              # tests with coverage
uv run black --check .     # formatting
uv run ruff check .        # linting
uv run mypy                # type checking

Pull requests run the same checks on Python 3.10 through 3.13.

License

Apache License 2.0 — see LICENSE and NOTICE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloudstack_extension_proxmox_ngine-0.1.0.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file cloudstack_extension_proxmox_ngine-0.1.0.tar.gz.

File metadata

File hashes

Hashes for cloudstack_extension_proxmox_ngine-0.1.0.tar.gz
Algorithm Hash digest
SHA256 363cae20ebebcfdcd1726503e97ce0470b61efffa0d9005b35024abf1b3dbcc7
MD5 9b7b8f24a510495ffcb6e5c85e6e7873
BLAKE2b-256 48a4c6ffde76ce3420096f8423e8de3b60821b60a76de9a1b3e01a4ee705f491

See more details on using hashes here.

Provenance

The following attestation bundles were made for cloudstack_extension_proxmox_ngine-0.1.0.tar.gz:

Publisher: publish.yml on ngine-io/cloudstack-extension-proxmox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cloudstack_extension_proxmox_ngine-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cloudstack_extension_proxmox_ngine-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a68c293ea9efee1a3e14ecfd3cc61caf8ecc40e9f9864741d7cdc2af6c6ab68
MD5 bdd149a614c7ac03d5839ccd5f041dbb
BLAKE2b-256 87de15ff8030e57f446bf7e9e9e703634b3e678ad6604204a38aeb026c062ff7

See more details on using hashes here.

Provenance

The following attestation bundles were made for cloudstack_extension_proxmox_ngine-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ngine-io/cloudstack-extension-proxmox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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