RTM Toolbox: Free Homelab Calculators, Checklists & Scripts

The RTM Toolbox is the free collection of calculators, checklists and scripts from the guides on this site. Everything here is built from the real lab – measured numbers, tested commands, no fluff.

Tools

Get the bundle + what’s coming

RTM Academy is being built: hands-on labs, UK-market skills data, and a full config library. Waitlist members get the downloadable bundle of every tool above (plus the compose starters) first, and the first Skills Radar report.

Proxmox pre-flight script (full)

#!/usr/bin/env bash
# proxmox-upgrade-preflight.sh - ReadTheManual.co.uk
# Pre-flight checks before an in-place Proxmox VE or PBS major upgrade.
# READ THE FULL UPGRADE GUIDE FIRST. This script only checks; it changes nothing.
# Run as root on the node you plan to upgrade:  bash proxmox-upgrade-preflight.sh
set -u
pass=0; warn=0; fail=0
ok(){   echo "  [PASS] $1"; pass=$((pass+1)); }
wrn(){  echo "  [WARN] $1"; warn=$((warn+1)); }
bad(){  echo "  [FAIL] $1"; fail=$((fail+1)); }

echo "== Proxmox upgrade pre-flight (checks only, no changes) =="

# 1. root?
[ "$(id -u)" = "0" ] && ok "running as root" || bad "not root - run with sudo/root"

# 2. which product + version
if command -v pveversion >/dev/null 2>&1; then
  v=$(pveversion | head -1); ok "Proxmox VE detected: $v"
elif command -v proxmox-backup-manager >/dev/null 2>&1; then
  v=$(proxmox-backup-manager version 2>/dev/null | head -1); ok "PBS detected: $v"
else
  bad "neither pveversion nor proxmox-backup-manager found - is this a Proxmox node?"
fi

# 3. disk space (need comfortable headroom for a dist-upgrade)
for m in / /var; do
  availk=$(df -Pk "$m" 2>/dev/null | awk 'NR==2{print $4}')
  if [ -n "${availk:-}" ]; then
    availg=$((availk/1024/1024))
    if [ "$availk" -ge $((5*1024*1024)) ]; then ok "$m has ${availg}G free"; 
    elif [ "$availk" -ge $((2*1024*1024)) ]; then wrn "$m has only ${availg}G free - 5G+ recommended";
    else bad "$m has ${availg}G free - clear space before upgrading"; fi
  fi
done

# 4. repo sanity: enterprise repo without a subscription will 401 mid-upgrade
if grep -rqs "enterprise.proxmox.com" /etc/apt/sources.list /etc/apt/sources.list.d/ 2>/dev/null; then
  wrn "enterprise repo configured - fine WITH a subscription; otherwise switch to no-subscription first"
else
  ok "no enterprise repo configured (no-subscription path)"
fi

# 5. pending updates on the CURRENT release first
if apt-get -s upgrade 2>/dev/null | grep -q "^Inst"; then
  wrn "pending updates on current release - fully update BEFORE the major upgrade"
else
  ok "current release fully updated"
fi

# 6. running guests (VE only) - plan a window
if command -v qm >/dev/null 2>&1; then
  running=$(qm list 2>/dev/null | awk 'NR>1 && $3=="running"' | wc -l)
  ct=$(pct list 2>/dev/null | awk 'NR>1 && $2=="running"' | wc -l)
  [ "$((running+ct))" -gt 0 ] && wrn "$((running+ct)) guest(s) running - schedule a window or migrate first" || ok "no running guests"
fi

# 7. cluster quorum (VE clusters)
if command -v pvecm >/dev/null 2>&1 && pvecm status >/dev/null 2>&1; then
  pvecm status | grep -qi "quorate.*yes" && ok "cluster is quorate" || bad "cluster NOT quorate - do not upgrade"
fi

# 8. recent backup evidence
newest=$(find /var/log/vzdump -type f -mtime -7 2>/dev/null | head -1)
if [ -n "${newest:-}" ]; then ok "vzdump activity within 7 days"; else wrn "no vzdump logs in the last 7 days - take/verify backups first"; fi

echo ""
echo "== Result: $pass pass, $warn warn, $fail fail =="
[ "$fail" -gt 0 ] && echo "Fix every FAIL before upgrading. Read the guide for each WARN." || echo "No hard failures. Read the WARNs, take a fresh backup, then follow the guide."
Scroll to Top