Skip to content

A CLI app built in python for managing a Proxmox cluster.

License

Notifications You must be signed in to change notification settings

MemeSitar/pypve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPVE

PyPVE is a CLI app for managing a Proxmox cluster. It is built with Typer, and utilizes the Proxmox Virtualization Environment API.

Features

PyPVE currently supports:

  • status

    Prints the status of all the nodes in the cluster or the status of all of the VMs in the cluster.

  • start

    Starts the LXC or QEMU virtual machine with the specified VMID.

  • shutdown

    Gracefully stops the LXC or QEMU virtual machine with the specified VMID.

How to use?

The project is being developed on Python 3.9.1. Install the required packages with pip install -r requirements.txt and create the required JSON files in your home directory in .config/pypve/:

  • hosts.json

    Defines the host on which the API will be accessed. Should be in the following format:

    {
    "host": "[host IP or FQDN]"
    }
    
  • token.json

    Defines the API user's name, the name of the API key and the API key itself. Should be in the following format:

    {
    "username": "[user]@pam",
    "name": "[name of API key]",
    "value": "[API key]"
    }
    

After that's set up, you can use this CLI app with the following syntax: python main.py [command] [arguments] [options]

How to get a Proxmox API token?

You can generate your own Proxmox API token in the datacenter view, in Permissions => API Tokens, where you press the add button at the top of the page. The token itself must be saved to a file as it is only shown once upon generation.

Planned features

I am currently adding support for creating LXC containers from the CLI.

About

A CLI app built in python for managing a Proxmox cluster.

Topics

Resources

License

Stars

Watchers

Forks

Languages