Skip to content
Portfolio

Proxmox CLI Cheat Sheet

Quick reference for managing LXC containers (pct), QEMU/KVM VMs (qm), storage, and node status on Proxmox VE.

Replace <vmid> with the numeric ID shown in the web UI or CLI output.


Terminal window
pct list
pct status <vmid>
Terminal window
pct start <vmid>
pct shutdown <vmid> # graceful ACPI shutdown
pct stop <vmid> # force stop (like pulling power)
pct reboot <vmid>
Terminal window
# Download a template first (see section 5)
pct create 100 local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst \
--hostname my-lxc \
--memory 512 \
--cores 1 \
--rootfs local-lvm:8 \
--net0 name=eth0,bridge=vmbr0,ip=dhcp
pct destroy <vmid>
Terminal window
pct config <vmid> # show current config
pct set <vmid> -memory 1024 # change RAM
pct set <vmid> -cores 2 # change CPU cores
pct set <vmid> -onboot 1 # start on host boot
Terminal window
pct enter <vmid> # attach to container console
pct exec <vmid> -- bash # run a command inside the CT

Terminal window
qm list
qm status <vmid>
Terminal window
qm start <vmid>
qm shutdown <vmid> # graceful shutdown via guest agent / ACPI
qm stop <vmid> # force power off
qm reboot <vmid>
qm reset <vmid> # hard reset
Terminal window
qm config <vmid>
qm set <vmid> -memory 4096
qm set <vmid> -cores 4
qm set <vmid> -onboot 1
Terminal window
qm clone <source-vmid> <new-vmid> --name my-vm-clone --full 1
qm destroy <vmid>
Terminal window
qm terminal <vmid> # serial console (if configured)

Access the graphical console from the Proxmox web UI (noVNC / SPICE).


Terminal window
pveversion
pveversion -v # verbose — kernel, pve-manager, etc.
pvenode status
uptime
free -h
Terminal window
pvecm status
pvecm nodes
Terminal window
systemctl status pveproxy pvedaemon pve-cluster
systemctl restart pveproxy # restart web UI after cert changes

Terminal window
pvesm status
pvesm list local
pvesm list local-lvm
df -h
IDTypical use
localISO images, container templates, backups
local-lvmVM/CT disks (LVM-thin)
local-zfsZFS-based disk pool (if configured)

Terminal window
pveam update # refresh template index
pveam available
pveam download local debian-12-standard_12.7-1_amd64.tar.zst
Terminal window
vzdump <vmid> --storage local --mode snapshot --compress zstd
FlagDescription
--storage <id>Target storage pool
--mode snapshotLive backup with minimal downtime
--mode stopStop VM/CT before backup (consistent but disruptive)
--compress zstdCompress backup archive

List backups on storage:

Terminal window
ls /var/lib/vz/dump/

Terminal window
# Active and recent tasks (also visible in web UI → Datacenter → Tasks)
pvesh get /cluster/tasks
# Host syslog
journalctl -u pvedaemon -f
tail -f /var/log/pve/tasks/active

GoalCommand
List all CTspct list
List all VMsqm list
Graceful stop CTpct shutdown <vmid>
Force stop CTpct stop <vmid>
Graceful stop VMqm shutdown <vmid>
Enter CT shellpct enter <vmid>
Show CT configpct config <vmid>
Show VM configqm config <vmid>
Storage usagepvesm status
Proxmox versionpveversion
Backup VM/CTvzdump <vmid> --storage local

See Network configuration for bridges, /etc/network/interfaces, and DNS.