Overview
Want to master Proxmox VE through working examples? This by-example guide teaches Proxmox Virtual Environment fundamentals through 85 annotated, copy-paste-ready examples organized by complexity level—covering installation through full IaC automation pipelines.
What Is By-Example Learning?
By-example learning is an example-first approach where you learn through annotated, runnable code rather than narrative explanations. Each example is self-contained, immediately executable, and heavily commented to show:
- What each command does — Inline comments explain CLI flags, API paths, and Proxmox behavior
- Expected outputs — Using
# =>notation for command results, status outputs, and state changes - Proxmox mechanics — How VMs, containers, clusters, storage, and the REST API work together
- Key takeaways — 1-2 sentence summaries of patterns and operational best practices
This approach is ideal for experienced infrastructure engineers who already understand Linux, networking, and virtualization concepts, and want to quickly master Proxmox VE's tooling, CLI commands, and automation patterns through working examples.
Unlike narrative tutorials that build understanding through explanation and storytelling, by-example learning lets you see the command first, run it second, and understand it through direct interaction.
What Is Proxmox VE?
Proxmox Virtual Environment (PVE) is an open-source Type-1 hypervisor platform for running KVM virtual machines and LXC system containers. Unlike Type-2 hypervisors (VMware Workstation, VirtualBox) that run on top of an OS, Proxmox runs directly on bare metal. PVE provides:
- KVM virtualization — Full hardware virtualization for any OS (Windows, Linux, BSD)
- LXC containers — Lightweight OS-level virtualization sharing the host kernel
- Web UI — Browser-based management at
https://<host>:8006(ExtJS) - REST API — Full programmatic access; every UI action calls the API
- Clustering — Multi-node Corosync-based cluster with shared storage
- High Availability — Automatic VM/container failover across cluster nodes
- Software-Defined Networking — VXLAN, BGP-EVPN, VLAN-aware bridges
- Ceph integration — Built-in distributed storage using Ceph Squid 19.2.3 / Tentacle 20.2.1
Proxmox VE 9.2 (May 2026) is based on Debian 13 "Trixie", kernel 7.0, QEMU 11.0, LXC 7.0, and ZFS 2.4. New in 9.x: OCI image support for LXC containers, vTPM in qcow2 enabling snapshots with Windows Secure Boot/BitLocker, per-vCPU nested virtualization control.
Learning Path
%% Color Palette: Blue #0173B2, Orange #DE8F05, Teal #029E73, Purple #CC78BC, Brown #CA9161
graph TD
A["Beginner<br/>Examples 1-28<br/>Install, VMs, LXC, Storage<br/>Basic Operations"] --> B["Intermediate<br/>Examples 29-57<br/>Clustering, Ceph, SDN<br/>Backup & Automation"]
B --> C["Advanced<br/>Examples 58-85<br/>HA, IaC, GPU Passthrough<br/>Upgrades & Tuning"]
style A fill:#0173B2,color:#fff,stroke:#000
style B fill:#DE8F05,color:#fff,stroke:#000
style C fill:#029E73,color:#fff,stroke:#000
Progress from Proxmox fundamentals (installation, basic VM/container management, local storage) through production cluster operations (Ceph, SDN, backup to PBS) to advanced infrastructure automation (Terraform, Ansible, Packer, HA, GPU passthrough, PVE 8→9 upgrades).
Coverage Philosophy
This by-example guide provides comprehensive coverage of Proxmox VE operations through practical, annotated examples. Coverage represents depth and breadth of concepts—focus is on outcomes and understanding, not time.
What's Covered
- Installation — ISO download/verification, graphical/TUI installer, unattended install
- Web UI navigation — Dashboard, nodes, storage, datacenter views
- VM management — Create, configure, start/stop/migrate, clone, template, cloud-init
- LXC containers — Create from templates and OCI images, resource limits, migration
- Storage backends — Directory, LVM, ZFS, NFS, iSCSI, Ceph RBD, PBS
- Networking — Linux bridges, VLANs, bonding, SDN zones/VNets, VXLAN, BGP-EVPN
- Clustering — Multi-node setup, Corosync, QDevice for 2-node quorum
- Ceph — Full cluster init, OSD management, pools, erasure coding, health monitoring
- High Availability — HA Manager, fencing, failover testing, affinity rules
- Backup & restore — vzdump, PBS integration, live-restore, pruning policies
- Automation — Terraform (bpg/proxmox), Ansible (community.proxmox), Packer, REST API
- Advanced features — PCIe/GPU passthrough, vTPM, nested virtualization, SDN DHCP
- Upgrades — PVE 8→9 migration path, Ceph Quincy/Reef→Squid prerequisite
What's NOT Covered
- Proxmox Backup Server deep-dive — PBS 4.2 is covered as a PVE storage target; standalone PBS administration is a separate topic
- Proxmox Mail Gateway — Separate product
- Windows guest optimization — VirtIO driver installation covered briefly; deep Windows tuning out of scope
- All Terraform/Ansible modules — Focus on most common patterns; provider documentation covers edge cases
Prerequisites
Before starting this tutorial, you should be comfortable with:
- Linux fundamentals — Command line, file system, package management (apt), systemd
- Networking basics — IP addressing, VLANs, bridges, routing, DNS
- Virtualization concepts — Hypervisors, VMs vs containers, storage types
- Git basics — For IaC automation examples (Terraform, Ansible)
No prior Proxmox experience required—this guide starts from first principles (ISO download) and builds to production HA clusters with full IaC automation.
Example Structure
Each example follows a five-part format:
- Explanation (2-3 sentences) — What the example demonstrates and why it matters
- Diagram (when helpful) — Mermaid diagram visualizing architecture or execution flow
- Annotated code — Commands with inline
# =>comments showing outputs and state - Key takeaway — 1-2 sentence summary of the pattern learned
- Why It Matters — 50-100 words connecting to real production usage
This format emphasizes code first, explanation second—you see working commands before diving into conceptual details.
Getting Started
Install requirements and verify access before starting examples:
# Proxmox VE server requirements (bare metal or nested virt):
# - 64-bit CPU with hardware virtualization (Intel VT-x / AMD-V)
# - Minimum 2 GB RAM (8+ GB recommended for multiple VMs)
# - 32 GB storage (local disk or SAN LUN)
# - Network interface for management
# After installation, access the web UI from another machine:
# => Open browser: https://<proxmox-ip>:8006
# => Accept self-signed certificate warning
# => Log in: username=root, realm=PAM, password=<set during install>
# Verify PVE version from command line:
pveversion
# => pve-manager/9.2/... (running kernel: 7.0-1-pve)
# Check node status:
pvesh get /nodes/$(hostname)/status --output-format json | python3 -m json.tool
# => Returns node CPU, memory, uptime, and kernel informationSet up your bare-metal or nested-virtualization test environment, then proceed to Beginner examples.
Examples by Level
Beginner (Examples 1–28)
- Example 1: Download and Verify the Proxmox VE 9.2 ISO
- Example 2: Create a Bootable USB Drive
- Example 3: Run the Graphical PVE Installer
- Example 4: Run the Text-Based TUI Installer
- Example 5: Log In to the Web UI and Navigate the Dashboard
- Example 6: Configure the No-Subscription Repository
- Example 7: Upload an ISO Image to Local Storage via Web UI
- Example 8: Create a Basic KVM VM from ISO
- Example 9: Start, Stop, and Force-Kill a VM
- Example 10: Open VM Console via Web UI
- Example 11: Install Guest OS Using VirtIO Drivers
- Example 12: Resize a VM Disk
- Example 13: Take and Restore a VM Snapshot
- Example 14: Create an LXC Container from a Downloaded Template
- Example 15: Start, Stop, and Enter an LXC Container Shell
- Example 16: Create an LXC Container from an OCI Registry Image
- Example 17: Manage Users, Roles, and Permissions
- Example 18: Create an API Token for Automation
- Example 19: Configure PAM, LDAP, and OpenID Connect Authentication
- Example 20: Set Up Local Storage: Directory, LVM, ZFS Pool
- Example 21: Configure Network Bridges
- Example 22: View Cluster and Node Resource Usage
- Example 23: Enable and Configure the Proxmox Firewall
- Example 24: Schedule Automated Backups
- Example 25: Restore a VM from Backup
- Example 26: Clone a VM — Full Clone vs Linked Clone
- Example 27: Convert a VM to a Template
- Example 28: Monitor Logs and Tasks in the Web UI
Intermediate (Examples 29–57)
- Example 29: Create and Join a Multi-Node Cluster
- Example 30: Inspect Cluster Membership and Quorum Status
- Example 31: Configure a Corosync QDevice for 2-Node Clusters
- Example 32: Perform Live Online VM Migration Between Nodes
- Example 33: Migrate an LXC Container Between Nodes
- Example 34: Configure VLAN-Aware Networking on a Bridge
- Example 35: Set Up Linux Bonding for Network Redundancy
- Example 36: Configure NFS Storage Backend
- Example 37: Configure iSCSI Storage with LVM
- Example 38: Create a ZFS Pool via CLI
- Example 39: Initialise and Deploy a Ceph Cluster
- Example 40: Create and Configure Ceph Storage Pools
- Example 41: Create a Ceph Erasure-Coded Pool
- Example 42: Monitor Ceph Cluster Health and OSD Status
- Example 43: Configure SDN: Zone, VNet, and Subnet
- Example 44: Set Up a VXLAN Zone for Multi-Node L2 Overlay
- Example 45: Configure BGP-EVPN Zone for Routed L3 SDN
- Example 46: Configure a Fabric for SDN (New in PVE 9.0)
- Example 47: Configure Distributed Firewall with Security Groups
- Example 48: Integrate Proxmox Backup Server (PBS 4.2)
- Example 49: Use vzdump for Manual Backup and Schedule Backup Jobs
- Example 50: Restore a VM Backup with Live-Restore from PBS
- Example 51: Configure Backup Encryption and Pruning in PBS
- Example 52: Manage LXC Container Resource Limits
- Example 53: Configure Cloud-Init for Automated VM Provisioning
- Example 54: Use pvesh to Query and Modify Cluster Resources
- Example 55: Configure RBAC with Pools
- Example 56: Configure Unattended Installation Using Answer File
- Example 57: Set Up Notification Endpoints
Advanced (Examples 58–85)
- Example 58: Enable and Configure the HA Manager for VM Failover
- Example 59: Configure HA Fencing
- Example 60: Test HA Failover Using the HA Simulator
- Example 61: Configure HA Affinity Rules (New in PVE 9.0)
- Example 62: Set Up Cross-Cluster VM Migration
- Example 63: Use the Terraform Provider to Provision VMs with Cloud-Init
- Example 64: Use Terraform to Manage LXC Containers as Code
- Example 65: Automate VM Lifecycle with community.proxmox Ansible Collection
- Example 66: Use Ansible to Clone, Configure, and Destroy VMs at Scale
- Example 67: Build a Golden VM Template with Packer
- Example 68: Full IaC Pipeline: Packer → PVE Template → Terraform Clone
- Example 69: Write Custom Scripts Using the PVE REST API with curl
- Example 70: Use proxmoxer Python Library for API-Driven Automation
- Example 71: Configure PCIe Passthrough (GPU, NIC, Storage)
- Example 72: Configure USB Device Passthrough
- Example 73: Configure NVIDIA vGPU on PVE 9
- Example 74: Enable and Manage Nested Virtualization
- Example 75: Configure vTPM and Take VM Snapshots with Active vTPM
- Example 76: Perform an In-Place Upgrade from PVE 8 to PVE 9
- Example 77: Upgrade Ceph from Quincy/Reef to Squid Before PVE 9
- Example 78: Configure Storage Replication Between Cluster Nodes
- Example 79: Monitor and Manage Storage Replication Jobs
- Example 80: Set Up Ceph RBD Mirroring for Cross-Cluster Disaster Recovery
- Example 81: Tune ZFS ARC Size and Configure ZFS Datasets
- Example 82: Configure S3-Compatible Backup Target in PBS 4.2
- Example 83: Implement Full Backup Rotation Strategy with PBS
- Example 84: Configure SDN with DHCP IP Management
- Example 85: Benchmark and Tune VM Disk I/O with VirtIO-BLK and Cache Modes
Last updated April 28, 2026