☼
⌃
☰

Proxmox

Table of Contents

Open-source server virtualisation platform combining KVM (full VMs) and LXC (lightweight containers) in a single web-managed environment. Primary use case here is home lab hypervisor on the mini PC — running pentest targets, Splunk, and Wazuh as VMs or containers without separate licences.

Web UI: https://<host-ip>:8006 Docs: https://pve.proxmox.com/wiki/Main_Page

Related: Linux Containers Virtualization Ansible VLANs

Installation

SHELL
# Download ISO from https://www.proxmox.com/en/downloads
# Flash to USB and boot — installer handles partitioning

# Post-install: disable enterprise repo (requires subscription)
# Edit /etc/apt/sources.list.d/pve-enterprise.list
# Comment out the enterprise line, add community repo:
echo "deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription" \
  >> /etc/apt/sources.list

apt update && apt full-upgrade -y

VM Management

SHELL
# List all VMs
qm list

# Start / stop / reset
qm start <vmid>
qm stop <vmid>
qm reset <vmid>
qm shutdown <vmid>     # graceful

# Create VM (basic — easier via web UI)
qm create 100 --name "kali" --memory 4096 --cores 2 \
  --net0 virtio,bridge=vmbr0 --cdrom local:iso/kali.iso

# Clone a VM (for spinning up multiple targets)
qm clone 100 101 --name "target-1" --full

# Snapshots
qm snapshot <vmid> <snapname>
qm rollback <vmid> <snapname>
qm delsnapshot <vmid> <snapname>

# Delete VM
qm destroy <vmid>

Container (LXC) Management

SHELL
# List containers
pct list

# Start / stop
pct start <ctid>
pct stop <ctid>

# Shell into container
pct enter <ctid>

# Create container from template
pct create 200 local:vztmpl/debian-12-standard_12.0-1_amd64.tar.zst \
  --hostname wazuh --memory 2048 --cores 2 \
  --net0 name=eth0,bridge=vmbr0,ip=dhcp

# Download a container template
pveam update
pveam available | grep debian
pveam download local debian-12-standard_12.0-1_amd64.tar.zst

Storage

SHELL
# List storage
pvesm status

# List contents of a storage pool
pvesm list local

# Common storage types:
# local      → /var/lib/vz (ISO images, templates, backups)
# local-lvm  → LVM thin pool (VM disks, container volumes)
# NFS/CIFS   → network storage (shared across nodes)
# ZFS pool   → advanced storage with snapshots and RAID

Networking

Proxmox uses Linux bridges for VM networking. vmbr0 is created by default, bridged to the physical NIC.

SHELL
# View current network config
cat /etc/network/interfaces

# Add a VLAN-aware bridge (for lab network isolation)
# Edit /etc/network/interfaces:
# iface vmbr0 inet static
#   bridge-vlan-aware yes
#   bridge-vids 2-4094

See VLANs for VLAN theory. For lab isolation, create a separate bridge (vmbr1) with no physical NIC attached — VMs on this bridge can only talk to each other, not the internet. Useful for running vulnerable machines safely.

SHELL
# /etc/network/interfaces — isolated lab bridge
auto vmbr1
iface vmbr1 inet static
    address 10.10.10.1/24
    bridge-ports none
    bridge-stp off
    bridge-fd 0

Backups

SHELL
# Manual backup via CLI
vzdump <vmid> --storage local --mode snapshot --compress zstd

# Restore
qmrestore /var/lib/vz/dump/vzdump-qemu-<vmid>-*.tar.zst <new-vmid>
pct restore <new-ctid> /var/lib/vz/dump/vzdump-lxc-*.tar.zst

Scheduled backups: Datacenter → Backup → Add — configure storage, schedule, and retention from the web UI.

API

PYTHON
import requests

# Authenticate
session = requests.Session()
resp = session.post("https://<host>:8006/api2/json/access/ticket",
    data={"username": "root@pam", "password": "yourpassword"},
    verify=False)
ticket = resp.json()["data"]["ticket"]
csrf = resp.json()["data"]["CSRFPreventionToken"]

headers = {"CSRFPreventionToken": csrf}
cookies = {"PVEAuthCookie": ticket}

# List nodes
nodes = session.get("https://<host>:8006/api2/json/nodes",
    headers=headers, cookies=cookies, verify=False)
print(nodes.json())

Tips

  • Disable the enterprise repository subscription nag immediately after install — it appears on every login otherwise
  • Use snapshots before making significant changes to a VM — rollback is instant compared to rebuilding
  • The isolated bridge (vmbr1 with no physical port) is the cleanest way to run vulnerable lab machines — they cannot reach your home network or the internet
  • Clone a clean baseline VM and take a snapshot — spinning up a new target is then a two-command operation
  • LXC containers use significantly less RAM than full VMs — prefer them for services like Wazuh, Grafana, and Splunk where a full Windows/Kali install is not needed
  • The API is comprehensive — almost everything in the web UI can be scripted, useful for automating lab setup