Proxmox VE Command-Line Reference

The Proxmox CLI commands you actually reach for -- cluster status, VM and container management, storage, and backup/restore -- grouped by task, not alphabetically.

A working reference, organized by task, not an exhaustive manual -- see the Proxmox VE Administration Guide for the rest. Jump to the section for the task you're doing; this page isn't meant to be read top to bottom.

Placeholders used below, with example values:

Placeholder Meaning Example
<VMID> A virtual machine's numeric ID 101
<CTID> A container's numeric ID 200
<NODE> A cluster node's hostname pve2
<STORAGE> A configured storage ID local-zfs
<BACKUP-FILE> Path to a vzdump archive /var/lib/vz/dump/vzdump-qemu-101-2026_09_21.vma.zst

Cluster and node status

$ pvecm status          # quorum, votes, membership

Confirms the cluster is quorate. This is the first thing to check when anything cluster-related seems wrong -- if Quorate isn't Yes, nothing else here behaves normally. Not applicable to a standalone (non-clustered) node.

$ pvecm nodes            # short node list

Just the membership table, no quorum detail.

$ pveversion -v          # exact package versions on this node

Confirms exactly what's installed -- useful when a command behaves differently than a guide (including this one) describes, since Proxmox does change CLI behavior across major versions.

$ pvesh get /cluster/resources   # every VM/CT/node/storage, as JSON

The machine-readable form of what the web UI's dashboard shows -- useful for scripting against, not for reading directly.

VM management (qm)

$ qm list                          # all VMs on this node, with status
$ qm config <VMID>                 # full config of a VM
$ qm start <VMID>
$ qm migrate <VMID> <NODE> --online     # live-migrate a running VM

Without --online, the VM is migrated offline (stopped, moved, restarted) -- only use the bare form if brief downtime is acceptable.

$ qm set <VMID> --memory 8192           # change a setting (here: RAM, in MB)

⚠ Destructive/disruptive:

$ qm stop <VMID>

Kills the VM's process immediately -- "akin to pulling the power plug." Any unsaved guest-OS state is lost. Prefer qm shutdown <VMID> (sends an ACPI signal, like pressing the power button) unless the guest is already unresponsive.

$ qm resize <VMID> scsi0 +20G

Grows a disk by 20GB. Growing only -- there is no supported way to shrink a disk this way, and attempting to work around that (shrinking inside the guest OS without also shrinking the underlying volume) risks data loss.

$ qm template <VMID>

Converts a VM into a template. This is a one-way structural change -- a templated VM can no longer be started directly, only cloned from.

Container management (pct)

Same shape as qm, for LXC containers:

$ pct list
$ pct config <CTID>
$ pct start <CTID>
$ pct enter <CTID>        # drop into a shell inside the container
$ pct exec <CTID> -- ls /root   # run one command inside the container
$ pct set <CTID> --memory 2048

pct enter and pct exec are the two worth remembering specifically -- containers don't have a console in the same sense a VM does, so these are how you actually get in.

Storage (pvesm)

$ pvesm status                     # every configured storage, with free space
$ pvesm list <STORAGE>             # every disk image on one storage

Useful for auditing what's actually consuming space on a target when the web UI's summary isn't specific enough.

Backup and restore

$ vzdump <VMID> --storage <STORAGE> --mode snapshot --compress zstd

--mode snapshot (the default) backs up a running VM with minimal downtime using a storage snapshot -- needs snapshot-capable storage (ZFS, Ceph, qcow2). --mode stop is the fallback when your storage doesn't support snapshots: it stops the VM first, for the most consistent possible backup at the cost of real downtime for the duration of the backup.

$ qmrestore <BACKUP-FILE> <VMID> --storage <STORAGE>

Restores a VM. Note the argument order: the backup file comes first, then the VM ID -- the opposite order from container restore below, and a common source of mistakes.

$ pct restore <CTID> <BACKUP-FILE>

Restores a container. Argument order here is CTID first, then the backup file -- the reverse of qmrestore above.

$ vzdump <VMID> --storage <STORAGE> --prune-backups keep-last=3,keep-weekly=4

Runs a backup and applies a retention policy in the same command -- keeps the last 3 backups plus one per week for 4 weeks, deleting anything older that doesn't match a kept slot. Retention options: keep-last, keep-hourly, keep-daily, keep-weekly, keep-monthly, keep-yearly, or keep-all=1 to disable pruning entirely.

Common errors

Error / symptom Cause Fix
A qm/pct command hangs with no output The cluster filesystem (/etc/pve, backed by pvecm) is waiting on quorum Check pvecm status -- commands touching cluster-wide config block until quorum is available
vzdump fails with a lock error Another backup, or a manual qm/pct operation, already holds that VM/container's lock qm unlock <VMID> (or pct unlock <CTID>) clears a lock left by a crashed process -- confirm nothing legitimate is actually still running first
qmrestore or pct restore fails with "already exists" The target VMID/CTID is already in use Pick an unused ID, or add --force only if you specifically intend to overwrite (this destroys the existing VM/container at that ID)
qm resize refuses to run Attempting to shrink, or targeting a disk that doesn't exist on that VM Growing only -- qm config <VMID> to confirm the correct disk identifier (e.g. scsi0, virtio0)
A command works on one node but the target VM/CT "doesn't exist" on another You're on the right cluster but the wrong assumption -- IDs are cluster-wide, but a command run against a specific node's local resource won't find something that lives elsewhere qm list / pct list are per-node by default; pvesh get /cluster/resources shows everything cluster-wide

Resources

Official documentation (man pages):

  • pvecm -- cluster management
  • qm -- VM management
  • pct -- container management
  • pvesm -- storage management
  • vzdump -- backup

Source and releases:

Community:

Related DaemonPress projects:


Last verified: 2026-09-21, checked against each command's official man page (linked above).

Changelog:

  • 2026-09-21 -- Retyped from Build to Cheat sheet (it had a fake "Verify it works" checklist and Troubleshooting section on what is fundamentally a lookup reference, the exact mismatch the editorial standard exists to fix). Restructured every example around consistent <PLACEHOLDER> notation with a legend, added explicit warning markers on destructive commands, added the --prune-backups retention syntax (not in the original at all), and replaced narrative Troubleshooting with a "Common errors" table. Dropped the linux/self-hosting tags (neither earned -- this page is Proxmox-specific, not general Linux administration, and doesn't teach self-hosting). Moved from it-sysadmin to virtualization-containers.
  • 2026-09-21 (earlier) -- Original version published as a Build-type page.