Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

prox is a command line interface to rapidly deploy LXC containers on proxmox from a remote host using proxmox REST API

Project Description


prox is a command line interface to rapidly deploy LXC containers on proxmox from a remote host using proxmox REST API.

prox supports a number of sub commands and command line options:

> prox --help
usage: prox  [-h] [--debug]

a tool for deploying resources from proxmox (LXC containers or VMs)

positional arguments:
                        sub-command help
    assist (gui)        navigate application via GUI (experimental)
    ssh (connect)       connect to first host via ssh
    list (ls, show)     list hosts(s) with status, size and contact (optional)
    start (run)         start the host(s)
    stop (shutdown)     stop the host(s)
    destroy (delete)    delete the hosts(s) from disk
    modify (mod)        modify the config of one or more hosts
    snap (snapshot)     take a snapshot of the host
    rollback (rb)       roll back a snapshot
    new (create)        create one or more new hosts

optional arguments:
  -h, --help            show this help message and exit
  --debug, -g           verbose output for all commands

and one of the most common sub command will the ‘prox new’ to create a new machine:

> prox new --help
usage: prox new [-h] [--runlist RUNLIST] [--mem MEM] [--disk DISK]
                [--cores CORES] [--store-net] [--bootstrap] [--no-bootstrap]
                [hosts [hosts ...]]

positional arguments:
  hosts                 hostname(s) of VM/containers (separated by space),
                        example: prox new host1 host2 host3

optional arguments:
  -h, --help            show this help message and exit
  --runlist RUNLIST, -r RUNLIST
                        a local shell script file or a command to execute
                        after install
  --mem MEM, -m MEM     Memory allocation for the machine, e.g. 4G or 512
                        Default: 512
  --disk DISK, -d DISK  disk storage allocated to the machine. Default: 4
  --cores CORES, -c CORES
                        Number of cores to be allocated for the machine.
                        Default: 2
  --store-net, -s       use networked storage with backup (nfs, ceph) instead
                        of local storage
  --bootstrap, -b       auto-configure the system using Chef.
  --no-bootstrap, -n    do not auto-configure the system using Chef.

To install prox you can simply use pip3. But before you may need a few OS packages. On Ubuntu / Debian you would run:

sudo apt-get install -y python3-pip python3-dev libffi-dev libssl-dev

and on CentOS/RedHat you would run:

yum -y install epel-release python34-devel libffi-devel openssl-devel

after that you can run pip3:

pip3 install --upgrade pip
pip3 install --upgrade proxmox-tools

after that you just need to configure prox, you can do this by uncommenting the lines that start with ‘export ‘ directly in file /usr/local/bin/prox or you paste the export statements into file ~/.proxrc in the home directory of the user who runs prox.

> cat ~/.proxrc
export PPROXHOST=''
export PREALM='pam'
export PLXCTEMPLATE='proxnfs:vztmpl/ubuntu-16.04-standard_16.04-1_amd64.tar.gz'
export PSTORLOC='proxazfs'
export PSTORNET='proxnfs'

now let’s say you want to deploy a new docker host named sausage:

> prox new --mem 1024 --disk 8 sausage
Password for 'user':

creating host sausage with ID 121 in pool SciComp
Starting host 121 ..
Machine 121 : running, cpu: 0%

waiting for machine sausage to come up .. hit ctrl+c to stop ping

now you can install docker manually. As a next step let’s assume you would like to install docker on multiple machines. We can create a runlist in a simple text file and each command in that list will be executed on each machine. In this case we made a runlist that installs docker:

> cat ~/runlist-docker
sudo apt-key adv --keyserver hkp:// --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo echo "deb ubuntu-xenial main" > /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get install -y docker-engine

now we can use the prox command to install multiple machines:

> prox new --runlist ~/runlist-docker --disk 8 sausage1 sausage2 sausage3
Password for 'user':

creating host sausage1 with ID 116 in pool SciComp
creating host sausage2 with ID 118 in pool SciComp
creating host sausage3 with ID 121 in pool SciComp
Starting host 116 ..
starting host 116, re-try 0
Machine 116 : running, cpu: 0%
Starting host 118 ..
Machine 118 : running, cpu: 0%
Starting host 121 ..
Machine 121 : running, cpu: -1%

and after you are done with your work you can stop and then destroy these machines:

> prox stop sausage1 sausage2 sausage3
Password for 'user':


> prox destroy sausage1 sausage2 sausage3
Password for 'user':


script runs inside newly deployed ProxMox VM or Container, queries promox API for correct hostname according to MAC address found on the local system and set the new hostname

If you have an IPAM device (such as Infoblox) you just need to change the hostname on your Linux to have dynamic DNS get you a new IP address. This allows you to deploy many hosts within seconds

tested with Ubuntu 14.04 and Ubuntu 16.04

Release History

This version
History Node


History Node


History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(23.9 kB) Copy SHA256 Hash SHA256
Source None Sep 11, 2017

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting