Proxmox VE Administration
Overview
This skill drives Proxmox VE 8.x/9.x remotely from the user's workstation.
It maintains a per-instance connection profile (SSH credentials + API
token + defaults). Every helper script reads the active profile, so the
agent never needs to ask the user for credentials twice.
The profile can live in either of two places:
- A project folder that you own — recommended. Auto-detected when a
.proxmox-admin/ directory is found in $PWD or any ancestor. Lets
you version-control profiles, inventory, decisions, and runbooks
together. Scaffold with scripts/pmx-init. See
project-folder.md.
~/.config/proxmox-admin/ — the historical default. Used when no
project folder is detected. Backwards compatible with all prior versions.
Two execution paths run side by side:
- SSH + curl helpers (
scripts/pmx-*) — always available, even with
only an SSH key. Required for shell-level ops with no REST equivalent.
- cv4pve-cli (
scripts/pmx-cv4) — optional fast path. Single binary,
kubectl-style contexts, full REST coverage. Recommended.
Profiles are the canonical source of truth. pmx-cv4pve-sync mirrors them
into cv4pve-cli contexts so the user never duplicates credentials.
Decision tree — start here
Is there an active profile?
(.proxmox-admin/active in cwd or ancestor, OR ~/.config/proxmox-admin/active)
├── NO → For a single-throwaway profile: read references/onboarding.md, run scripts/pmx-onboard.
│ For anything you want to keep: run scripts/pmx-init <dir>, then pmx-onboard from inside.
│ See references/project-folder.md for the recommended pattern.
└── YES → Run scripts/pmx-doctor to confirm reachability.
├── Any check fails → references/troubleshooting.md
└── All checks pass → Pick the task lane below.
Task lanes
| User intent |
Primary helper |
Deep reference |
| Provision / manage a VM |
scripts/pmx-vm or pmx-cv4 do start guest --guest X |
vm-management.md |
| Provision / manage an LXC container |
scripts/pmx-ct |
container-management.md |
| Storage (ZFS, LVM-thin, NFS, Ceph) |
scripts/pmx-storage |
storage.md |
| Networking / SDN (zones, VNets, Fabrics, BGP) |
scripts/pmx-ssh 'pvesh ...' |
networking-sdn.md |
| Cluster, HA, quorum, dynamic load balancer |
scripts/pmx-cluster |
cluster-ha.md |
| Backups, restore, PBS |
scripts/pmx-backup |
backup-pbs.md |
| API tokens, roles, ACLs |
scripts/pmx-token-create |
api-tokens.md |
| Security hardening |
(multiple) |
security-hardening.md |
| Terraform / Ansible / IaC |
n/a (delegate to provider) |
iac-terraform-ansible.md |
| PegaProx / multi-cluster orchestration |
n/a (community tool) |
pegaprox.md |
| Compare or install remote CLIs |
scripts/pmx-cv4pve-install |
remote-cli-tools.md |
| Scaffold a project folder for this skill |
scripts/pmx-init |
project-folder.md |
| Capture live state into diffable markdown |
scripts/pmx-inventory snapshot |
project-folder.md |
| Look up any CLI flag fast |
— |
cli-cheat-sheet.md |
| Anything broken |
scripts/pmx-doctor |
troubleshooting.md |
Project layout (recommended)
For anything beyond a single throwaway profile, scaffold a project
folder that holds connection profiles, inventory, decisions, and
runbooks together in version control:
mkdir my-proxmox-project && cd my-proxmox-project
~/.claude/skills/proxmox-admin/scripts/pmx-init
The skill auto-detects .proxmox-admin/ in $PWD or any ancestor and
uses it as the config root. Falls back to ~/.config/proxmox-admin/ if
no project folder is found — backwards compatible with prior versions.
Full layout, secret-handling conventions, cross-OS notes, and migration
path from ~/.config/: references/project-folder.md.
Onboarding workflow (first run)
Before any other action, if no profile exists yet:
# (Recommended) scaffold a project folder first
scripts/pmx-init <project-dir>
cd <project-dir>
cp secrets/env.sh.example secrets/env.sh
$EDITOR secrets/env.sh # fill in the token secret(s) later
# Profile creation + verification
scripts/pmx-onboard # interactive wizard, writes 0600 YAML
scripts/pmx-doctor # verifies SSH + REST reachability
scripts/pmx-inventory snapshot # capture initial inventory as diffable markdown
scripts/pmx-cv4pve-install # optional but recommended
scripts/pmx-cv4pve-sync --activate
Full prerequisites and the discovery commands to gather the inputs the
wizard asks for: references/onboarding.md.
If the user has no API token yet, the wizard can run without one; then:
scripts/pmx-token-create skill / # creates user, role, ACL, token
# Capture the secret it prints once; re-run pmx-onboard to embed it
Daily workflow (after onboarding)
# Pick / inspect profile
scripts/pmx-profile list # mark active with *
scripts/pmx-profile use prod-east # switch active
# Read-only sanity
scripts/pmx-cv4 get vms # or: pmx-cv4 get cts, get nodes
scripts/pmx-ssh 'pvesm status'
# Provision
scripts/pmx-vm create 110 web-1 --memory 4096
scripts/pmx-ct create 200 web debian-12-standard
scripts/pmx-vm cloudinit 110 --ciuser deploy --sshkeys ~/.ssh/id_ed25519.pub \
--ipconfig0 ip=10.0.0.110/24,gw=10.0.0.1
# Day-2 ops
scripts/pmx-vm start 110
scripts/pmx-backup run --all --mode snapshot --compress zstd
scripts/pmx-cluster status
Working with multiple instances
Each Proxmox node or cluster gets its own profile file. Switch with
pmx-profile use <name> or one-shot via PMX_PROFILE=<name>. cv4pve-cli
contexts stay in sync automatically as long as the user re-runs
pmx-cv4pve-sync after profile changes.
Conventions for the agent
- Read before write. Always run
pmx-vm config <id> (or the API
equivalent) before any destructive action. Cross-check the user's
intent against the actual state.
- No password auth. SSH helpers force
BatchMode=yes. If a profile
needs new auth, edit the profile, do not pass passwords inline.
- Secrets handling. Token secrets in profiles use the
${ENV:VAR}
reference form by default. Do not echo secrets to the user; redact
before quoting profile contents.
- Prefer the REST/cv4pve path for stateless reads and config sets.
Reserve
pmx-ssh for things with no REST endpoint (network config,
pveperf, journalctl, file edits).
- Profile is canonical. Never write Proxmox credentials elsewhere on
the workstation. Other tools (Terraform, Ansible, cv4pve-cli) should
reference the same profile values.
- Confirm before destruction.
qm destroy, pct destroy, pvesm remove,
pveum acl delete, pvecm delnode, force-quorum recovery, and any
--purge flag must be confirmed with the user — no exceptions.
- 2026 defaults.
virtio-scsi-single + iothread=1, q35 + ovmf,
cputype=host, agent enabled=1, --unprivileged 1 for containers,
--mode snapshot --compress zstd for backups, --privsep 0 only when
the simpler debug path is wanted.
Available scripts
Run <script> --help for the full interface of each. All scripts read the
active profile via the resolution order documented in
references/project-folder.md — first
$PMX_CONFIG_DIR env, then auto-detected .proxmox-admin/ in cwd or
ancestor, then ~/.config/proxmox-admin/. They accept PMX_PROFILE=<name>
for one-shot override, and write JSON to stdout / diagnostics to stderr
when --json is supported.
| Script |
Purpose |
Notable flags |
scripts/pmx-init |
Scaffold a project folder with profiles/inventory/decisions/runbooks |
--force to overwrite |
scripts/pmx-onboard |
Interactive wizard → YAML profile |
env-driven (non-interactive) when PMX_ONBOARD_* set |
scripts/pmx-doctor |
TCP + SSH + REST + cv4pve checks |
--json |
scripts/pmx-inventory |
Snapshot live state to diffable markdown |
snapshot | diff | show <cat> |
scripts/pmx-profile |
list/use/show/path/remove/active |
list --json |
scripts/pmx-ssh |
Run any shell command on the host |
- reads command from stdin |
scripts/pmx-api |
Call REST API with the active token |
forwards extra args to curl |
scripts/pmx-vm |
qm wrapper with profile defaults |
create, from-image, cloudinit, destroy --dry-run |
scripts/pmx-ct |
pct wrapper with profile defaults |
create, from-oci, download-template |
scripts/pmx-storage |
pvesm wrapper |
scan-iso, scan-vztmpl |
scripts/pmx-cluster |
pvecm + ha-manager + cluster API |
resources --type vm |
scripts/pmx-backup |
vzdump / qmrestore / pct restore |
--dry-run, `restore vm |
scripts/pmx-token-create |
One-shot least-privilege pveum token |
PMX_ROLE, PMX_PRIVSEP, PMX_PRIVS |
scripts/pmx-cv4pve-install |
Install Corsinvest cv4pve-cli locally |
PMX_CV4PVE_VERSION, PMX_CV4PVE_PREFIX |
scripts/pmx-cv4pve-sync |
Mirror profiles → cv4pve contexts |
--activate, --skip |
scripts/pmx-cv4 |
cv4pve-cli auto-aligned to active profile |
forwards all args |
references/ and assets/ are listed in the table at the top of this file.
Open them only when their topic comes up.
1---2name: proxmox-admin3description: Use this skill to administer a Proxmox VE 8.x/9.x host, node, or cluster remotely — provisioning, day-2 ops, troubleshooting, hardening, IaC, migration off VMware/ESXi. Covers KVM VMs (qm), LXC containers (pct; OCI in 9.1+), storage (pvesm; ZFS, LVM-thin, NFS, Ceph), networking and SDN (zones, VNets, Fabrics in 9.0+, BGP/WireGuard in 9.2+), clustering and HA (pvecm, ha-manager, Dynamic Load Balancer in 9.2+), backup/restore (vzdump, Proxmox Backup Server), API tokens (pveum), firewall and security, and IaC (Terraform bpg/Telmate, Ansible). Onboards a YAML connection profile (SSH key + API token + defaults) under ~/.config/proxmox-admin/ and drives ops via bundled SSH/REST helpers or cv4pve-cli. Trigger even when the user does not say "Proxmox" — e.g. "spin up a VM on my homelab", "the LXC container is OOMing", "web UI at port 8006", "vCenter alternative", ProxMox, PVE, PBS, ProxLB, PegaProx, vmbr0, vmid, cloud-init, GPU passthrough, ZFS pool, cluster quorum, qm, pct, pvesh.4license: MIT5---67# Proxmox VE Administration89## Overview1011This skill drives Proxmox VE 8.x/9.x **remotely** from the user's workstation.12It maintains a per-instance **connection profile** (SSH credentials + API13token + defaults). Every helper script reads the active profile, so the14agent never needs to ask the user for credentials twice.1516The profile can live in either of two places:17181. **A project folder** that you own — recommended. Auto-detected when a19 `.proxmox-admin/` directory is found in `$PWD` or any ancestor. Lets20 you version-control profiles, inventory, decisions, and runbooks21 together. Scaffold with `scripts/pmx-init`. See22 [project-folder.md](references/project-folder.md).232. **`~/.config/proxmox-admin/`** — the historical default. Used when no24 project folder is detected. Backwards compatible with all prior versions.2526Two execution paths run side by side:27281. **SSH + curl helpers** (`scripts/pmx-*`) — always available, even with29 only an SSH key. Required for shell-level ops with no REST equivalent.302. **cv4pve-cli** (`scripts/pmx-cv4`) — optional fast path. Single binary,31 kubectl-style contexts, full REST coverage. Recommended.3233Profiles are the canonical source of truth. `pmx-cv4pve-sync` mirrors them34into cv4pve-cli contexts so the user never duplicates credentials.3536## Decision tree — start here3738```39Is there an active profile?40 (.proxmox-admin/active in cwd or ancestor, OR ~/.config/proxmox-admin/active)41├── NO → For a single-throwaway profile: read references/onboarding.md, run scripts/pmx-onboard.42│ For anything you want to keep: run scripts/pmx-init <dir>, then pmx-onboard from inside.43│ See references/project-folder.md for the recommended pattern.44└── YES → Run scripts/pmx-doctor to confirm reachability.45 ├── Any check fails → references/troubleshooting.md46 └── All checks pass → Pick the task lane below.47```4849### Task lanes5051| User intent | Primary helper | Deep reference |52|-------------|----------------|----------------|53| Provision / manage a VM | `scripts/pmx-vm` or `pmx-cv4 do start guest --guest X` | [vm-management.md](references/vm-management.md) |54| Provision / manage an LXC container | `scripts/pmx-ct` | [container-management.md](references/container-management.md) |55| Storage (ZFS, LVM-thin, NFS, Ceph) | `scripts/pmx-storage` | [storage.md](references/storage.md) |56| Networking / SDN (zones, VNets, Fabrics, BGP) | `scripts/pmx-ssh 'pvesh ...'` | [networking-sdn.md](references/networking-sdn.md) |57| Cluster, HA, quorum, dynamic load balancer | `scripts/pmx-cluster` | [cluster-ha.md](references/cluster-ha.md) |58| Backups, restore, PBS | `scripts/pmx-backup` | [backup-pbs.md](references/backup-pbs.md) |59| API tokens, roles, ACLs | `scripts/pmx-token-create` | [api-tokens.md](references/api-tokens.md) |60| Security hardening | (multiple) | [security-hardening.md](references/security-hardening.md) |61| Terraform / Ansible / IaC | n/a (delegate to provider) | [iac-terraform-ansible.md](references/iac-terraform-ansible.md) |62| PegaProx / multi-cluster orchestration | n/a (community tool) | [pegaprox.md](references/pegaprox.md) |63| Compare or install remote CLIs | `scripts/pmx-cv4pve-install` | [remote-cli-tools.md](references/remote-cli-tools.md) |64| Scaffold a project folder for this skill | `scripts/pmx-init` | [project-folder.md](references/project-folder.md) |65| Capture live state into diffable markdown | `scripts/pmx-inventory snapshot` | [project-folder.md](references/project-folder.md) |66| Look up any CLI flag fast | — | [cli-cheat-sheet.md](references/cli-cheat-sheet.md) |67| Anything broken | `scripts/pmx-doctor` | [troubleshooting.md](references/troubleshooting.md) |6869## Project layout (recommended)7071For anything beyond a single throwaway profile, scaffold a **project72folder** that holds connection profiles, inventory, decisions, and73runbooks together in version control:7475```bash76mkdir my-proxmox-project && cd my-proxmox-project77~/.claude/skills/proxmox-admin/scripts/pmx-init78```7980The skill auto-detects `.proxmox-admin/` in `$PWD` or any ancestor and81uses it as the config root. Falls back to `~/.config/proxmox-admin/` if82no project folder is found — backwards compatible with prior versions.8384Full layout, secret-handling conventions, cross-OS notes, and migration85path from `~/.config/`: **[references/project-folder.md](references/project-folder.md)**.8687## Onboarding workflow (first run)8889Before any other action, if no profile exists yet:9091```bash92# (Recommended) scaffold a project folder first93scripts/pmx-init <project-dir>94cd <project-dir>95cp secrets/env.sh.example secrets/env.sh96$EDITOR secrets/env.sh # fill in the token secret(s) later9798# Profile creation + verification99scripts/pmx-onboard # interactive wizard, writes 0600 YAML100scripts/pmx-doctor # verifies SSH + REST reachability101scripts/pmx-inventory snapshot # capture initial inventory as diffable markdown102scripts/pmx-cv4pve-install # optional but recommended103scripts/pmx-cv4pve-sync --activate104```105106Full prerequisites and the discovery commands to gather the inputs the107wizard asks for: **[references/onboarding.md](references/onboarding.md)**.108109If the user has no API token yet, the wizard can run without one; then:110111```bash112scripts/pmx-token-create skill / # creates user, role, ACL, token113# Capture the secret it prints once; re-run pmx-onboard to embed it114```115116## Daily workflow (after onboarding)117118```bash119# Pick / inspect profile120scripts/pmx-profile list # mark active with *121scripts/pmx-profile use prod-east # switch active122123# Read-only sanity124scripts/pmx-cv4 get vms # or: pmx-cv4 get cts, get nodes125scripts/pmx-ssh 'pvesm status'126127# Provision128scripts/pmx-vm create 110 web-1 --memory 4096129scripts/pmx-ct create 200 web debian-12-standard130scripts/pmx-vm cloudinit 110 --ciuser deploy --sshkeys ~/.ssh/id_ed25519.pub \131 --ipconfig0 ip=10.0.0.110/24,gw=10.0.0.1132133# Day-2 ops134scripts/pmx-vm start 110135scripts/pmx-backup run --all --mode snapshot --compress zstd136scripts/pmx-cluster status137```138139## Working with multiple instances140141Each Proxmox node or cluster gets its own profile file. Switch with142`pmx-profile use <name>` or one-shot via `PMX_PROFILE=<name>`. cv4pve-cli143contexts stay in sync automatically as long as the user re-runs144`pmx-cv4pve-sync` after profile changes.145146## Conventions for the agent147148- **Read before write.** Always run `pmx-vm config <id>` (or the API149 equivalent) before any destructive action. Cross-check the user's150 intent against the actual state.151- **No password auth.** SSH helpers force `BatchMode=yes`. If a profile152 needs new auth, edit the profile, do not pass passwords inline.153- **Secrets handling.** Token secrets in profiles use the `${ENV:VAR}`154 reference form by default. Do not echo secrets to the user; redact155 before quoting profile contents.156- **Prefer the REST/cv4pve path** for stateless reads and config sets.157 Reserve `pmx-ssh` for things with no REST endpoint (network config,158 pveperf, journalctl, file edits).159- **Profile is canonical.** Never write Proxmox credentials elsewhere on160 the workstation. Other tools (Terraform, Ansible, cv4pve-cli) should161 reference the same profile values.162- **Confirm before destruction.** `qm destroy`, `pct destroy`, `pvesm remove`,163 `pveum acl delete`, `pvecm delnode`, force-quorum recovery, and any164 `--purge` flag must be confirmed with the user — no exceptions.165- **2026 defaults.** `virtio-scsi-single` + `iothread=1`, `q35 + ovmf`,166 `cputype=host`, `agent enabled=1`, `--unprivileged 1` for containers,167 `--mode snapshot --compress zstd` for backups, `--privsep 0` only when168 the simpler debug path is wanted.169170## Available scripts171172Run `<script> --help` for the full interface of each. All scripts read the173active profile via the resolution order documented in174[references/project-folder.md](references/project-folder.md) — first175`$PMX_CONFIG_DIR` env, then auto-detected `.proxmox-admin/` in cwd or176ancestor, then `~/.config/proxmox-admin/`. They accept `PMX_PROFILE=<name>`177for one-shot override, and write JSON to stdout / diagnostics to stderr178when `--json` is supported.179180| Script | Purpose | Notable flags |181|--------|---------|---------------|182| `scripts/pmx-init` | Scaffold a project folder with profiles/inventory/decisions/runbooks | `--force` to overwrite |183| `scripts/pmx-onboard` | Interactive wizard → YAML profile | env-driven (non-interactive) when `PMX_ONBOARD_*` set |184| `scripts/pmx-doctor` | TCP + SSH + REST + cv4pve checks | `--json` |185| `scripts/pmx-inventory` | Snapshot live state to diffable markdown | `snapshot \| diff \| show <cat>` |186| `scripts/pmx-profile` | list/use/show/path/remove/active | `list --json` |187| `scripts/pmx-ssh` | Run any shell command on the host | `-` reads command from stdin |188| `scripts/pmx-api` | Call REST API with the active token | forwards extra args to `curl` |189| `scripts/pmx-vm` | `qm` wrapper with profile defaults | `create`, `from-image`, `cloudinit`, `destroy --dry-run` |190| `scripts/pmx-ct` | `pct` wrapper with profile defaults | `create`, `from-oci`, `download-template` |191| `scripts/pmx-storage` | `pvesm` wrapper | `scan-iso`, `scan-vztmpl` |192| `scripts/pmx-cluster` | `pvecm` + `ha-manager` + cluster API | `resources --type vm` |193| `scripts/pmx-backup` | `vzdump` / `qmrestore` / `pct restore` | `--dry-run`, `restore vm|ct` |194| `scripts/pmx-token-create` | One-shot least-privilege pveum token | `PMX_ROLE`, `PMX_PRIVSEP`, `PMX_PRIVS` |195| `scripts/pmx-cv4pve-install` | Install Corsinvest cv4pve-cli locally | `PMX_CV4PVE_VERSION`, `PMX_CV4PVE_PREFIX` |196| `scripts/pmx-cv4pve-sync` | Mirror profiles → cv4pve contexts | `--activate`, `--skip` |197| `scripts/pmx-cv4` | cv4pve-cli auto-aligned to active profile | forwards all args |198199`references/` and `assets/` are listed in the table at the top of this file.200Open them only when their topic comes up.