Skip to content

jochumdev/pmxc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pmxc - a console client for Proxmox VE

Install on Debian

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]"

Using pmxc

First create a remote:

WARNING: If you store the password it will be saved in plain text in ~/.config/pmxc/config.json

$ pmxc remote add pve01 https://pve01.fk.jochum.dev:8006 root@pam

Now you can list VM's/Container's:

$ pmxc list pve01

Or open a the virt-viewer on VM id 100:

$ 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/

$ pmxc enter pve01 100

Or open a shell on the container 101:

You can exit it with: CTRL+A q

$ 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

$ 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:

$ 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

About

Python API Client for Proxmox VE

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages