Document and add reviewed Proxmox operations skill for INFvHost 1
This commit is contained in:
1 parent
4377041b85
commit
eb5706add2
5 files changed
+479
No files matched your search
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 kevwillow
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,29 @@
|
||||
# Local operations edition — 2026-10-21
|
||||
|
||||
Upstream: https://github.com/kevwillow/proxmox-manager-agent-skill
|
||||
Revision: 9c9528e32e82a0e4d30d9f39f57bfd8ee4d8668c (MIT; LICENSE retained)
|
||||
Local name: proxmox-manager-agent-ops; version: 1.4.0-ops.1.
|
||||
|
||||
Requested by Michael: remove irreversible disk/guest deletion workflows, retain
|
||||
real operational actions. Original upstream has NOT been installed or modified.
|
||||
|
||||
Removed: disk partition/format/overwrite workflows, pool provisioning/removal,
|
||||
guest deletion, overwrite/rollback recovery recipes, credential/account/access
|
||||
setup snippets, broad privilege templates, installer and bundled scripts. Some
|
||||
omitted sections mixed normal operations with these excluded steps. No executable
|
||||
scripts, external installer, hidden payload, ignore-list or encoded commands ship.
|
||||
|
||||
Retained/adapted: command paths, output guidance, node/storage observation,
|
||||
VM/CT creation examples, lifecycle, snapshots, backup/check guidance, cluster
|
||||
status and migration. The existing authorized administrative SSH terminal is used;
|
||||
no privilege-setup commands are included. Added a separately identified reference
|
||||
for stale-lock checks, explicit unlock, reviewed updates and node reboot.
|
||||
|
||||
This is procedural guidance, not a technical restriction on SSH privileges.
|
||||
No statement of live Proxmox maintenance validation is made. No Proxmox host
|
||||
configuration is changed during installation. Never auto-update from upstream:
|
||||
new upstream revisions require a new review and fresh security scan.
|
||||
|
||||
Installation must be gated by the unchanged Hermes community-source scanner.
|
||||
If it blocks retained operational commands, stop and report; do not hide them,
|
||||
change trust levels, force installation, or weaken scanning.
|
||||
@@ -0,0 +1,255 @@
|
||||
---
|
||||
name: proxmox-manager-agent-ops
|
||||
description: "Proxmox VE command reference for an existing SSH connection: diagnose nodes, manage VM/LXC lifecycle, create guests, take snapshots and backups, migrate guests, inspect locks, apply approved host updates and reboot nodes. Excludes disk provisioning and irreversible deletion."
|
||||
version: 1.4.0-ops.1
|
||||
author: kevwillow; locally adapted for Michael
|
||||
license: MIT
|
||||
platforms: [linux]
|
||||
---
|
||||
|
||||
# Proxmox Manager Agent — operations edition
|
||||
|
||||
Locally adapted from kevwillow/proxmox-manager-agent-skill at commit
|
||||
9c9528e32e82a0e4d30d9f39f57bfd8ee4d8668c. This is a separate, limited edition,
|
||||
not the unmodified upstream skill. See LOCAL-CHANGES.md and LICENSE.
|
||||
|
||||
## Scope and operating rules
|
||||
|
||||
Use the already configured SSH terminal for this profile. First establish which
|
||||
node and Proxmox version are being addressed. Do not create accounts, change
|
||||
access controls, retrieve credentials, or install access-setup templates.
|
||||
The examples assume an already authorized administrative terminal; if permission
|
||||
is missing, stop and report it rather than altering the host's access policy.
|
||||
|
||||
Preserve all user-level exclusions, including the prohibition on access to VPN
|
||||
containers, their data and credentials. General diagnostics do not override it.
|
||||
|
||||
Observe first, then propose the specific change and its expected impact. The
|
||||
user's request to install this skill is not authorization to run its commands.
|
||||
Require an explicit maintenance request for disruptive actions: hard stop,
|
||||
reboot, unlocking, migrations, updates, rollbacks or networking changes.
|
||||
Never act on an unrelated guest. Inspect protection and HA state before changes.
|
||||
Wait for a task to finish, verify its result, then continue; a UPID only means
|
||||
submitted. Do not claim operational testing merely because this skill is installed.
|
||||
|
||||
Excluded actions: irreversible guest or snapshot deletion, removal of backup
|
||||
history, overwriting existing guests, disk or filesystem creation/destruction,
|
||||
partition changes, storage pool creation/removal and host access provisioning.
|
||||
Do not invoke equivalent destructive API operations or alternative tools.
|
||||
If requested, explain the exclusion; do not invent an alternate execution path.
|
||||
|
||||
Do not change host networking, cluster membership or access policy as a side
|
||||
effect of routine maintenance. Inspect the live command/API schema first:
|
||||
`pvesh usage <path> -v`, `qm help`, `pct help` and `pveversion -v`.
|
||||
Use node names exactly as returned by the API. Respect the installed PVE release.
|
||||
|
||||
## The Command Surface
|
||||
|
||||
### Binary locations (PVE 8/9)
|
||||
|
||||
| Binary | Path | Purpose |
|
||||
|---|---|---|
|
||||
| `qm` | `/usr/sbin/qm` | KVM/QEMU VM management |
|
||||
| `pct` | `/usr/sbin/pct` | LXC container management |
|
||||
| `pvesh` | **`/usr/bin/pvesh`** | Proxmox API CLI (preferred for scripted ops) |
|
||||
| `pvesm` | `/usr/sbin/pvesm` | Storage manager |
|
||||
| `vzdump` | `/usr/bin/vzdump` | Backup |
|
||||
| `qemu-img` | `/usr/bin/qemu-img` | Raw disk image operations |
|
||||
| `pveum` | `/usr/sbin/pveum` | User/permission manager |
|
||||
| `pvecm` | `/usr/bin/pvecm` | Cluster manager |
|
||||
| `ha-manager` | `/usr/sbin/ha-manager` | HA (high availability) manager |
|
||||
| `pve-firewall` | `/usr/sbin/pve-firewall` | Firewall rules compiler |
|
||||
| `pveam` | `/usr/bin/pveam` | Appliance manager (templates, ISOs) |
|
||||
| `qmrestore` | `/usr/sbin/qmrestore` | Restore from vzdump backup |
|
||||
| `vma` | `/usr/bin/vma` | VMA archive verification |
|
||||
|
||||
### Output formats
|
||||
|
||||
`pvesh` returns JSON for nested objects and a tabular format for lists.
|
||||
Both are stable across PVE 8/9.
|
||||
|
||||
```bash
|
||||
pvesh get /version
|
||||
# {"release":"9.2","repoid":"b9984c6d90a4bd80","version":"9.2.2"}
|
||||
|
||||
pvesh get /nodes
|
||||
# ┌────────┬────────┬───────┬─...
|
||||
# │ node │ status │ cpu │...
|
||||
# ╞════════╪════════╪═══════╪═...
|
||||
# │ pve │ online │ 0.17% │
|
||||
# └────────┴────────┴───────┴─...
|
||||
```
|
||||
|
||||
`qm list` and `pct list` return empty when there are no VMs/containers.
|
||||
Empty output is not an error; distinguish an empty result from a failed command by checking its exit code.
|
||||
|
||||
## Common workflows
|
||||
|
||||
### Reading host state
|
||||
|
||||
```bash
|
||||
# Node health (CPU, RAM, uptime, kernel)
|
||||
pvesh get /nodes/<node>/status
|
||||
|
||||
# Storage status
|
||||
pvesm status
|
||||
|
||||
# Cluster resources (across all nodes if clustered)
|
||||
pvesh get /cluster/resources --type node
|
||||
|
||||
# All VMs on the cluster
|
||||
pvesh get /cluster/resources --type vm
|
||||
|
||||
# All LXC containers
|
||||
pvesh get /cluster/resources --type ct
|
||||
```
|
||||
|
||||
### Creating a VM from an ISO
|
||||
|
||||
```bash
|
||||
# 1. Pick a free VMID in your range (or ask Proxmox: pvesh get /cluster/nextid)
|
||||
VMID=<vmid>
|
||||
|
||||
# 2. Create with sensible defaults
|
||||
qm create $VMID \
|
||||
--name "ubuntu-test" \
|
||||
--memory 2048 \
|
||||
--cores 2 \
|
||||
--net0 virtio,bridge=vmbr0 \
|
||||
--scsihw virtio-scsi-single \
|
||||
--scsi0 local-lvm:32 \
|
||||
--ide2 local:iso/ubuntu-24.04-live-server-amd64.iso,media=cdrom \
|
||||
--boot "order=scsi0;ide2" \
|
||||
--ostype l26
|
||||
|
||||
# 3. Start it
|
||||
qm start $VMID
|
||||
|
||||
# 4. See the screen without a browser (root): save a screenshot, then view it
|
||||
echo "screendump /tmp/vm-$VMID.ppm" | qm monitor $VMID
|
||||
```
|
||||
|
||||
`order=scsi0;ide2` boots the disk first; an empty disk falls through to the
|
||||
installer, and the installed system boots on the next start. Eject the ISO
|
||||
afterwards with `qm set <vmid> --ide2 none,media=cdrom`. The `screendump`
|
||||
screenshot is how an agent checks what a console-only VM is showing (convert
|
||||
the PPM to PNG to view it). Measured: a Debian 13 netinst VM built this way
|
||||
showed its installer menu.
|
||||
|
||||
### Creating an LXC container
|
||||
|
||||
```bash
|
||||
# 1. Update the template list, find the current name, download it.
|
||||
# The list includes arm64 builds; pick the one matching the host.
|
||||
pveam update
|
||||
pveam available --section system | grep -E 'debian-13.*amd64'
|
||||
pveam download local <template-name>
|
||||
|
||||
# 2. Create the container (key-based root login; no password on the command line)
|
||||
pct create <ctid> local:vztmpl/<template-name> \
|
||||
--hostname debian-ct \
|
||||
--memory 1024 \
|
||||
--cores 2 \
|
||||
--net0 name=eth0,bridge=vmbr0,ip=dhcp \
|
||||
--rootfs vmdata:16 \
|
||||
--features nesting=1 \
|
||||
--unprivileged 1 \
|
||||
--start 1
|
||||
```
|
||||
|
||||
### Lifecycle commands
|
||||
|
||||
```bash
|
||||
qm start <vmid> # or pct start <ctid>
|
||||
qm shutdown <vmid> # graceful ACPI shutdown
|
||||
qm stop <vmid> # hard stop (only after shutdown times out)
|
||||
qm reboot <vmid>
|
||||
qm snapshot <vmid> <snapname>
|
||||
qm list
|
||||
|
||||
pct start <ctid>
|
||||
pct shutdown <ctid>
|
||||
pct stop <ctid>
|
||||
pct reboot <ctid>
|
||||
pct list
|
||||
```
|
||||
|
||||
|
||||
A hard stop is not a graceful shutdown: attempt shutdown first, then obtain
|
||||
approval for hard stop if it times out. Snapshot rollback discards later changes
|
||||
and is not included in this edition; use a separate reviewed recovery plan.
|
||||
After a host reboot, inspect stopped guests and ask before starting guests that
|
||||
were not configured to start automatically. A protected guest must stay protected.
|
||||
|
||||
### Backups
|
||||
|
||||
```bash
|
||||
# One-shot backup of a single VM (Mode A: POST /nodes/<node>/vzdump vmid=<vmid> ... returns a UPID)
|
||||
vzdump <vmid> --storage <backup-storage> --mode snapshot --compress zstd
|
||||
|
||||
# One-shot backup of all VMs on a node
|
||||
vzdump --all 1 --storage <backup-storage> --mode snapshot --compress zstd
|
||||
|
||||
# Schedule via the GUI or /cluster/backup; the agent should usually defer
|
||||
# scheduling to the user since it requires decisions about retention,
|
||||
# offsite targets, etc.
|
||||
```
|
||||
|
||||
**Checking a backup, measured on PVE 9.2.2.** Three checks catch different
|
||||
failures; only the last one proves the data:
|
||||
|
||||
| Check | Catches | Misses |
|
||||
|---|---|---|
|
||||
| `zstd -tq <file>.vma.zst` | bit rot in the stored file (vzdump writes an XXH64 checksum) | anything wrong before compression |
|
||||
| `zstd -dc <file>.vma.zst \| vma verify -` | truncation, damaged headers and structure | corrupted VM data: 4 of 4 archives with flipped data bytes passed |
|
||||
| restore to a scratch VMID and read known data | everything above, plus whether it boots | — |
|
||||
|
||||
Run `vma verify` on a stream as above. Do not decompress to `/tmp`: on PVE 9
|
||||
`/tmp` is a RAM-backed tmpfs, so a large backup fills memory. In a pipeline,
|
||||
check every stage (`set -o pipefail`), not just the last.
|
||||
|
||||
|
||||
Restore is limited to a separate unused VMID under a separately approved plan; never overwrite an existing guest. Do not alter retention or delete backup history.
|
||||
### Cluster operations (multi-node)
|
||||
|
||||
If the host is in a cluster:
|
||||
|
||||
```bash
|
||||
# Cluster status
|
||||
pvecm status
|
||||
|
||||
# Nodes in the cluster
|
||||
pvesh get /nodes
|
||||
|
||||
# Migrate a running VM to another node
|
||||
qm migrate <vmid> <target-node> --online 1
|
||||
|
||||
# HA status
|
||||
ha-manager status
|
||||
|
||||
# PVE 9: HA groups are replaced by HA rules (node and resource affinity).
|
||||
# Existing groups migrate automatically once every node runs PVE 9.
|
||||
ha-manager rules list
|
||||
```
|
||||
|
||||
|
||||
## Node maintenance, locks and updates
|
||||
|
||||
Read `references/node-maintenance.md` before unlocks, host updates or node reboot.
|
||||
These local additions are guidance, not a claim of live validation on this host.
|
||||
|
||||
## Verification
|
||||
|
||||
After each change, check the specific guest with `qm status <vmid>` or
|
||||
`pct status <ctid>`, then recheck node/cluster resources. For asynchronous tasks,
|
||||
check the task's final exit status. Confirm the relevant service is reachable.
|
||||
Use only necessary, narrowly scoped diagnostics; never collect credentials or
|
||||
unrelated private configuration. Fetch the version-matched official docs when
|
||||
parameters or behavior are unclear.
|
||||
|
||||
## Sources
|
||||
|
||||
- https://github.com/kevwillow/proxmox-manager-agent-skill
|
||||
- https://pve.proxmox.com/pve-docs/
|
||||
- https://pve.proxmox.com/pve-docs/api-viewer/
|
||||
- https://pve.proxmox.com/wiki/Downloads
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
# Node maintenance: locally added reference
|
||||
|
||||
This supplement retains the user's intended administrative actions. It is not
|
||||
an automatic maintenance job. Existing authorized SSH access is a prerequisite.
|
||||
No account, access policy or network setup is performed by this skill.
|
||||
|
||||
## Inspect first
|
||||
|
||||
Run on the intended Proxmox node, not on the Hermes gateway:
|
||||
|
||||
```bash
|
||||
hostname
|
||||
pveversion -v
|
||||
qm list
|
||||
pct list
|
||||
pvesm status
|
||||
pvecm status
|
||||
ha-manager status
|
||||
pvesh get /nodes
|
||||
```
|
||||
|
||||
The cluster commands may report that a standalone node is not clustered; that
|
||||
is not permission to create or reconfigure a cluster. Check the intended node's
|
||||
running tasks via its live API schema and GUI task list. Record guest placement,
|
||||
HA requirements, backup/migration activity and maintenance impact.
|
||||
|
||||
## Unlock a stale VM or container lock
|
||||
|
||||
Inspect only the affected guest's status, configuration lock and related tasks.
|
||||
A lock during backup, restore or migration is expected. Do not remove it while
|
||||
the task is still running; establish that the task is finished or definitively
|
||||
failed. Unlock does not cancel the underlying task.
|
||||
|
||||
After an explicit request for the identified stale lock:
|
||||
|
||||
```bash
|
||||
qm status <vmid>
|
||||
qm config <vmid>
|
||||
qm unlock <vmid>
|
||||
qm status <vmid>
|
||||
```
|
||||
|
||||
For LXC, use the matching commands:
|
||||
|
||||
```bash
|
||||
pct status <ctid>
|
||||
pct config <ctid>
|
||||
pct unlock <ctid>
|
||||
pct status <ctid>
|
||||
```
|
||||
|
||||
Do not repeat unlock in a loop or restart unrelated services. If the task or
|
||||
lock ownership cannot be established, report uncertainty and stop.
|
||||
|
||||
## Updates within the installed Proxmox major release
|
||||
|
||||
Confirm the release and review the official update guide for that release:
|
||||
https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_system_software_updates
|
||||
|
||||
Check backup coverage, console/recovery access, free space and healthy cluster
|
||||
quorum. Do not change repository suites or subscription configuration as an
|
||||
unrequested side effect. Refresh package metadata and review a simulation:
|
||||
|
||||
```bash
|
||||
apt-get update
|
||||
apt-get -s dist-upgrade
|
||||
```
|
||||
|
||||
Stop on repository/authentication failures or removal of core Proxmox packages.
|
||||
Explain the package plan and service impact. Under an explicit maintenance
|
||||
instruction, apply the reviewed plan:
|
||||
|
||||
```bash
|
||||
apt-get dist-upgrade
|
||||
```
|
||||
|
||||
Do not auto-answer prompts or run unattended. Use a recoverable session if the
|
||||
connection could be interrupted. Handle configuration prompts with the user.
|
||||
A major-version upgrade requires its own official migration guide and preflight;
|
||||
it is not covered by this generic routine. Never bypass Proxmox package guards.
|
||||
|
||||
## Node reboot
|
||||
|
||||
Confirm the maintenance request, affected guests, migration/shutdown plan,
|
||||
backup status, quorum and HA requirements. In a cluster, handle one node at a
|
||||
time and follow the official HA maintenance procedure for that installed version.
|
||||
Do not reboot merely to clear an unexplained guest lock.
|
||||
|
||||
Only after the reviewed plan and approval:
|
||||
|
||||
```bash
|
||||
systemctl reboot
|
||||
```
|
||||
|
||||
The SSH disconnect is expected. Reconnect to the same node; verify boot time,
|
||||
version, storage, cluster health and intended guest states. Report any unresolved
|
||||
issue; do not start unrelated guests automatically.
|
||||
Reference in new issue
Block a user