cheat-sheets

Proxmox Troubleshooting and One-Liners

Quick checks, logs and recovery steps for a PVE node or cluster.

Documentation: Proxmox VE Admin Guide · Package Repositories

Verification: pveversion -v, qm unlock, pvecm updatecerts, pvecm delnode, pvecm expected and the node removal steps were checked against the docs. Not verified against the docs: pct subcommands, systemctl restart pve-cluster, the /etc/pve read-only note, qm stop --skiplock, /etc/hosts fixes and the service and log names below (they come from common practice). No command was executed. Back up before destructive recovery steps (Proxmox Backup and Restore).

See also: Proxmox VE Overview and Install · Proxmox Clustering and HA · Proxmox Networking · Proxmox Storage · Linux · tmux


Versions and Health #

COMMANDDESCRIPTION
pveversionPVE version
pveversion -vAll component versions (include in bug reports)
uname -rRunning kernel
pvesh get /cluster/resourcesEverything the cluster knows about
pvecm statusQuorum and votes
pvesm statusStorage state
zpool status -xZFS health (only problems)
smartctl -a /dev/<DISK>Disk SMART data
df -h && free -hSpace and memory
uptimeLoad average

Services and Logs #

COMMANDDESCRIPTION
systemctl status pveproxy pvedaemon pvestatd pve-clusterCore services
systemctl restart pveproxy pvedaemonRestart web UI and API
systemctl restart pvestatdFix grey question marks on guests and storage
systemctl restart pve-clusterRestart pmxcfs (/etc/pve)
systemctl restart corosyncRestart cluster membership
journalctl -u pveproxy -fWeb UI logs
journalctl -u pve-cluster -u corosync -bCluster logs since boot
journalctl -b -p errErrors since boot
journalctl -k | grep -i -e error -e failKernel errors
tail -f /var/log/pve/tasks/activeRunning tasks
ls /var/log/pve/tasks/Task logs

Locks and Stuck Guests #

A failed backup, migration or snapshot can leave a lock.

COMMANDDESCRIPTION
qm unlock <VMID>Remove a VM lock
pct unlock <CTID>Remove a container lock
qm stop <VMID> --skiplockForce stop a locked VM
qm config <VMID> | grep lockSee the lock reason
ps aux | grep "kvm -id <VMID>"Find the process if qm stop hangs
kill -9 <PID>Last resort for a hung VM process (may corrupt the disk)
rm /var/lock/qemu-server/lock-<VMID>.confStale local lock file

Check that no backup or migration is really still running (Tasks in the GUI) before unlocking.


Remove a Node from a Cluster #

See Proxmox Clustering and HA for the full procedure. Short form on a remaining node, with the dead node powered off:

bash
pvecm delnode <NODE>
rm -r /etc/pve/nodes/<NODE>

Remove its key from /etc/pve/priv/authorized_keys too. Reinstall the old node before reusing it.

Cluster Without Quorum #

/etc/pve is read-only and guests cannot be started.

COMMANDDESCRIPTION
pvecm statusCheck votes
pvecm expected 1Emergency: force quorum on a lone node, undo by restoring the other nodes
systemctl restart corosync pve-clusterAfter network fixes

Fix the network or add a QDevice instead of forcing quorum whenever you can.


Web UI and SSH Problems #

COMMANDDESCRIPTION
pvecm updatecerts --forceRebuild node certificates and SSH keys
hostname --ip-addressMust not be 127.0.0.1, fix /etc/hosts
cat /etc/hostsNeeds <IP> <FQDN> <HOSTNAME> for this node
ss -tlnp | grep 8006Is pveproxy listening
curl -k https://localhost:8006Local test, see curl
pve-firewall stopRule out the firewall (Proxmox Firewall)

Repository and Update Errors #

  • 401 Unauthorized on enterprise.proxmox.com: you have no subscription, disable the enterprise repositories and add the no-subscription one (Proxmox VE Overview and Install).
  • Release file ... not valid yet or a time error: fix the clock (timedatectl, NTP).
  • Partial upgrade breakage: apt update && apt dist-upgrade, then dpkg --configure -a.

Guest Problems #

COMMANDDESCRIPTION
qm showcmd <VMID> --prettySee the exact KVM command line
qm terminal <VMID>Serial console
qm agent <VMID> pingGuest agent reachable
qm rescanFix missing disks after storage changes
pct enter <CTID>Shell into a container
pct config <CTID>Container config
journalctl -b | grep -i <VMID>Related host logs

Boot a VM from an ISO or live disk to repair it. The storage and disk details are on Proxmox Storage and Proxmox qm and pct.


Handy One-Liners #

COMMANDDESCRIPTION
qm list | awk 'NR>1 && $3=="running" {print $1}'IDs of running VMs
for v in $(qm list | awk 'NR>1 {print $1}'); do qm snapshot $v pre-update; doneSnapshot all VMs
pvesh get /cluster/resources --type vm --output-format json | jq -r '.[].name'Guest names (jq)
pveam update && pveam available --section systemRefresh the template list
ls /etc/pve/qemu-server/ /etc/pve/lxc/Guest configs on this node
cat /etc/pve/storage.cfgStorage definitions
apt list --upgradablePending updates
last reboot | headReboot history
pveperfQuick CPU, disk and DNS performance test

Run long jobs inside tmux so an SSH drop does not kill them.

Search all sheets

Tip: / or Ctrl/Cmd+K to open, Esc to close.