pmxc is a comprehensive Python API client designed for seamless interaction with Proxmox VE. With intuitive commands, it simplifies operations on virtual machines and containers, allowing for efficient management from the console. Ideal for automation scripts, pmxc streamlines workflows while providing advanced features for experienced users.
pmxc is a robust console client designed for seamless interaction with Proxmox VE (Virtual Environment). This Python-based API client enables users to efficiently manage virtual machines (VMs) and containers through a concise command-line interface.
Key Features
-
Remote Management: Easily add remote Proxmox servers and manage resources. For example:
$ pmxc remote add pve01 https://pve01.fk.jochum.dev:8006 root@pam -
VM and Container Management: List all VMs and containers with simple commands:
$ pmxc list pve01 -
Access Virt-Viewer: Launch virt-viewer for a specific VM, such as VM id 100:
$ pmxc spice pve01 100 -
Serial Console Access: Enter a serial console of a Linux VM with the following command:
$ pmxc enter pve01 100Note: Ensure the serial console is properly configured within the VM.
-
Container Shell Access: Open a shell on a specific container (e.g., id 101):
$ pmxc enter pve01 101Exit the shell with CTRL+A then q.
-
Command Piping: Execute commands directly via the serial console:
$ echo "/bin/bash -c 'touch /test; echo bla'" | pmxc enter pve01 101
Installation
For installation on Debian, use the following commands to prepare the environment:
sudo apt install python3-click python3-pip python3-uvloop python3-aiohttp python3-texttable python3-aiodns python3-chardet virt-viewer
sudo pip3 install "<path-to-the-git-dir>[performance,uvloop]"
For developers looking to contribute or customize pmxc, a Python virtual environment can be set up as follows:
$ sudo apt install virtualenv
$ virtualenv -p /usr/bin/python3 venv
$ source venv/bin/activate
$ venv/bin/pip install -e ".[development,performance,uvloop]"
Compatibility
While pmxc is tailored for Unix-like operating systems, it has been reported to work under Cygwin on Windows, although user experience may vary.
Versioning
The version number of pmxc follows a structured format indicating compatibility with Proxmox VE API versions and internal release markers, such as 5.2.0.1 (where 5.2 refers to Proxmox VE 5.2 and 0.1 refers to the first release).
Copyright: Based on contributions from René Jochum, pmxc is distributed under the MIT license.
By utilizing pmxc, users can streamline their Proxmox VE operations, enhancing productivity and efficiency in virtual environment management.
No comments yet.
Sign in to be the first to comment.