A lightweight set of Bash scripts for Proxmox VE to quickly list and enter LXC containers and Virtual Machines directly from the node console. It bypasses the Proxmox Perl API by reading configuration files and PID states directly, reducing query times from several seconds to milliseconds.
Supports resolving targets by ID or exact hostname.
- Place both files (
pgoandlist-targets) into a directory that is part of your$PATH(e.g.,~/.local/bin/or/usr/local/bin/). - Make the scripts executable:
chmod +x ~/.local/bin/pgo ~/.local/bin/list-targets
- (Optional) If using
~/.local/bin/, ensure it is added to your$PATHin your~/.bashrcor~/.profile:export PATH="$HOME/.local/bin:$PATH"
To display a formatted, color-coded table of all VMs and LXCs and their current state:
list-targetsTo enter a guest, provide its ID or Name. The script automatically detects if it is an LXC or a VM and uses the appropriate connection method (pct enter or qm terminal).
pgo 100
pgo my-webserverUpon exiting the guest session (via exit for LXC or Ctrl+O for VM terminals), pgo will return to the host node and automatically print the updated list of targets.