PVE Builder
Proxmox VE VM builder with cloud-init automation, config-driven hardware defaults, validation, and static IP support
Like a lobster shell, security has layers — review code before you run it.
License
SKILL.md
CRITICAL: Agent Access Limitations
YOU DO NOT HAVE ACCESS TO PROXMOX
Agent runs on your local machine - NOT on Proxmox
Forbidden:
- Try to run qm commands
- Try to run pvesh commands
- Check storage availability
- Verify VM creation
- Access Proxmox API
Must Do:
- Output commands as text for user to copy/paste
- Tell user which node to SSH to
- Store keys locally in a configurable directory (default: ~/.ssh/pve-builder/)
- Never claim to create VMs
- Use web search for specs validation
PVE Builder Skill
Overview
Generates Proxmox VM creation commands with cloud-init configuration, SSH key management, and optional data disks. All hardware defaults are config-driven via pve-env.md.
IMPORTANT: Commands are output as text for you to copy/paste into Proxmox shell. The agent does NOT execute any Proxmox commands.
Environment Setup
- Config file:
pve-env.mdin the skill directory - Ignored from git:
.gitignoreexcludespve-env.md
Critical Configuration Keys (pve-env.md)
| Section | Keys | Purpose |
|---|---|---|
| Proxy | Proxy Required, HTTP Proxy, HTTPS Proxy, Proxy CA Certificate | Network proxy for apt inside VMs |
| SSH | Default User, Key Path, Key Type | Default SSH user, key storage location, key type |
| Network | Default Bridge, Default VLAN, DNS Server, Use DHCP Default, Network Interface | Default network settings and interface type |
| Storage | Default Storage, Template Path, Default OS Disk Size, Auto-Format Data Disks, Data Disk Interface, Default Cloud Image | Storage defaults and cloud image path |
| Node | Default Node, BIOS Type, Machine Type, CPU Type, OS Type, SCSI Controller, Onboot | Hardware defaults for VM creation |
| Workload Presets | Preset table (RAM/CPU/Disk) | Recommended specs per workload type |
| Package Defaults | Package Update, Base Packages | Always-installed package list |
Agent Workflow
The workflow uses section-based numbered prompts with continuous numbering across sections:
=== VM Specs ===
1. CPU cores 2. CPU sockets 3. RAM in GB 4. OS disk size
=== Network ===
5. Bridge 6. VLAN 7. DHCP?
[if static:] 8. IP 9. Gateway 10. DNS
=== User & Disks ===
11. SSH user 12. Add data disks? 13. Format? 14. Count 15.x: Disk sizes
15. Proxy? 16. Extra packages 17. SSH key directory
Steps:
- Load
pve-env.md(error if missing) - Ask cloud image path (default from config:
Template Path+Default Cloud Image) - Ask Proxmox node (default from config)
- Validate storage/bridge/image (see Validation section below)
- Ask VM name
- Software lookup (name or URL) → web search for RAM/CPU recommendations (or manual)
- Prompt specs (numbered prompts: cores, sockets, RAM, OS disk)
- Prompt network (bridge, VLAN, DHCP vs static)
- Static IP details (only if no DHCP)
- Prompt SSH username
- Prompt data disks (count, sizes, formatting option)
- Proxy configuration (yes/no/change)
- Extra apt packages
- SSH key directory (default from config)
- Generate SSH key (unique ed25519 per VM)
- Show summary & confirm
- VMID (direct input / auto helper / manual)
- Build cloud-init user-data YAML (packages, proxy, data disk formatting)
- Generate and display commands
- Optional: save commands to file
- Show SSH key path and chmod reminder
Validation
Before generating commands, the agent validates that the target storage, bridge, and cloud image exist on the Proxmox node.
Cache System
- Cache file:
~/.pve-builder/validation.json - Valid for: 24 hours
- Cache invalidated if: node, storage, or bridge values change
- On cache hit: validation is skipped if all checks passed
Validation Process
If no valid cache exists, the agent shows these commands for the user to run on the Proxmox node:
echo "=== Storage ==="; pvesm status
echo "=== Bridge ==="; ip -br link show
echo "=== Image ==="; ls -la <image-path>
echo "=== END ==="
Results are parsed:
- Storage: Checks if configured storage name exists in
pvesm status - Bridge: Verifies bridge interface is present and UP
- Image: Confirms cloud image file exists at path
On failure: Agent aborts and reports which check(s) failed. On success: Results are cached with node/storage/bridge/timestamp.
Notes
- Cloud-init user-data is written to
/var/lib/vz/template/cloud-init/<VMNAME>-user-data.yamlon the Proxmox node - The command to get the next VMID is provided as a hint; the agent does not run Proxmox commands
- SSH keys are stored locally in the configured directory (default:
~/.ssh/pve-builder/) - Generated commands include cleanup steps at the end: lists cloud-init YAML files for review, then removes the current VM's file
Networking
DHCP (default)
Simple network config: qm set --ipconfig0 ip=dhcp
Static IP
When DHCP is declined, the agent prompts for:
- IP address with CIDR (e.g.,
10.0.12.50/24) - Gateway (e.g.,
10.0.12.1) - DNS servers (comma-separated, default from config)
Generated commands:
qm set --ipconfig0 ip=10.0.12.50/24,gw=10.0.12.1qm set --nameserver 8.8.8.8
Package Installation
All VMs get base packages from pve-env.md (deduplicated with any extra packages).
If proxy is configured, apt proxy is automatically enabled in cloud-init.
Security
- SSH keys: Unique per VM, ed25519, no passphrase
- Passwords: Never used, SSH keys only
- pve-env.md: chmod 600, excluded from git
- Private keys: chmod 600, never in commands
- Public keys: Safe to embed in commands
- SSH key directory: configurable via
Key Pathin pve-env.md (default~/.ssh/pve-builder); permissions 700 on base dir
Version History
- 1.0.3: Full config decoupling (all hardware defaults from pve-env.md), storage/bridge validation with 24h cache, static IP support, continuous numbered prompts with section headers, SSH key path not echoed in summary, duplicate package removal, direct VMID input, cloud-init cleanup commands
- 1.0.2: Added URL analysis, web search validation, simplified proxy flow
- 1.0.1: Added explicit access limitation warnings
- 1.0.0: Initial release
This file is yours to evolve. As you learn who you are, update it.
Files
4 totalComments
Loading comments…
