https://github.com/jochumdev/pmxc
Python API Client for Proxmox VE
https://github.com/jochumdev/pmxc
Last synced: about 1 year ago
JSON representation
Python API Client for Proxmox VE
- Host: GitHub
- URL: https://github.com/jochumdev/pmxc
- Owner: jochumdev
- License: mit
- Created: 2018-05-27T20:46:16.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-08-18T06:34:02.000Z (almost 5 years ago)
- Last Synced: 2025-04-15T02:44:54.587Z (about 1 year ago)
- Language: Python
- Size: 58.6 KB
- Stars: 20
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- License: LICENSE
Awesome Lists containing this project
README
pmxc - a console client for Proxmox VE
======================================
Install on Debian
+++++++++++++++++
.. code:: bash
sudo apt install python3-click python3-pip python3-uvloop python3-aiohttp python3-texttable python3-aiodns python3-chardet virt-viewer
sudo pip3 install "[performance,uvloop]"
Using pmxc
++++++++++
First create a remote:
WARNING: If you store the password it will be saved in plain text in ~/.config/pmxc/config.json
.. code:: bash
$ pmxc remote add pve01 https://pve01.fk.jochum.dev:8006 root@pam
Now you can list VM's/Container's:
.. code:: bash
$ pmxc list pve01
Or open a the virt-viewer on VM id **100**:
.. code:: bash
$ pmxc spice pve01 100
If you add a serial console to a Linux VM (maybe also FreeBSD) you can enter it too now:
This requires that you setup the console first inside the VM: https://www.rogerirwin.co.nz/open-source/enabling-a-serial-port-console/
.. code:: bash
$ pmxc enter pve01 100
Or open a shell on the container **101**:
You can exit it with: CTRL+A q
.. code:: bash
$ pmxc enter pve01 101
Have fun with pmxc i hope you like it as i do :)
The `pmxc enter` command now supports piping commands:
You need to enable automatic login to serial console as described here: https://wiki.gentoo.org/wiki/Automatic_login_to_virtual_console
.. code:: bash
$ echo "/bin/bash -c 'touch /test; echo bla'" | pmxc enter pve01 101
Windows
++++++++++++++++++
2018 I had success with babun on Windows, now lacking a Windows box and babun discontinued I have no clue.
It should work unter cygwin though.
The version parts
+++++++++++++++++
The first 2 numbers are the Promox VE API pmxc targets to, the next 2 are the pmxc version.
Like 5.2.0.1 means its target for Promox VE 5.2 and its the first release (0.1) for that.
Development
+++++++++++
Linux
-----
Create a venv:
.. code:: bash
$ sudo apt install virtualenv
$ virtualenv -p /usr/bin/python3 venv
$ source venv/bin/activate
.. code:: bash
$ venv/bin/pip install -e ".[development,performance,uvloop]"
Now use ./venv/bin/pmxc instead of just plain `pmxc`
License
+++++++
MIT
Copyright
+++++++++
Copyright (c) 2018-2020 by René Jochum