Proxmox VE command line cheat sheet: qm, pct, pvecm, pvesm and more
The Proxmox VE commands you use most: qm for VMs, pct for containers, pvesm for storage, pvecm for the cluster, vzdump for backups, plus pvesh, pveam, ha-manager and pvenode.
Not checked by a trusted editor yet Last edited Outdated?
All of these run as root on a Proxmox VE node. Every tool has a man page (man qm) and built-in help (qm help create). In the examples, 110 is a VM, 200 a container and pve2 another node.
Virtual machines: qm
qm list # VMs on this node
qm status 110
qm config 110 # current configuration
qm start 110
qm shutdown 110 && qm wait 110 # clean ACPI shutdown
qm reboot 110
qm stop 110 # hard stop, like pulling the plug
qm set 110 --memory 4096 --cores 4
qm disk resize 110 scsi0 +10G # grow only
qm snapshot 110 before-update
qm listsnapshot 110
qm rollback 110 before-update
qm delsnapshot 110 before-update
qm clone 9000 120 --name app02 --full
qm template 9000
qm migrate 110 pve2 --online
qm terminal 110 # serial console (needs serial0)
qm guest exec 110 -- uname -a # via guest agent
qm unlock 110 # only if the locking task is gone
Containers: pct
pct list
pct start 200
pct shutdown 200
pct stop 200
pct enter 200 # root shell inside
pct exec 200 -- df -h
pct config 200
pct set 200 --memory 1024
pct snapshot 200 before-update
pct rollback 200 before-update
pct push 200 ./file /root/file
pct pull 200 /etc/os-release ./os-release
pct migrate 200 pve2 --restart
pct unlock 200
Templates: pveam
pveam update
pveam available --section system
pveam download local <template-file>
pveam list local
Storage: pvesm
pvesm status
pvesm list local-lvm
pvesm list local --content iso
pvesm path local-lvm:vm-110-disk-0
pvesm scan nfs 192.0.2.50
pvesm add nfs nas --server 192.0.2.50 --export /export/pve --content backup,iso
pvesm set nas --disable 1
Cluster: pvecm
pvecm status # quorum and membership
pvecm nodes
pvecm create lab-cluster # on the first node
pvecm add 10.0.0.11 # on a joining node
pvecm qdevice setup 10.0.0.50 # external vote for 2-node clusters
Backup and restore
vzdump 110 --storage nas --mode snapshot --compress zstd
vzdump --all --storage nas
qmrestore <backup-file> 410 --storage local-lvm
pct restore 420 <backup-file> --storage local-lvm
API, tasks and HA
pvesh get /nodes
pvesh get /cluster/resources --type vm --output-format json
pvenode task list --source active # running tasks
pvenode task list --errors --vmid 110
ha-manager status
ha-manager add vm:110
Commands that destroy data
Warning: these remove guests or data permanently. Confirm the ID with qm config, pct config or pvesm list first and make sure a tested backup exists.
qm destroy 110 --purge
pct destroy 200 --purge
pvesm free local-lvm:vm-110-disk-1
pvecm delnode pve4 # only after the node is powered off for good
Where things live
/etc/pve/qemu-server/<vmid>.confand/etc/pve/lxc/<ctid>.conf: guest configs on the current node./etc/pve/nodes/<node>/: per-node files in the cluster file system./etc/pve/storage.cfg: storage definitions./etc/pve/jobs.cfg: backup jobs./etc/pve/ha/: HA resources and rules./etc/network/interfaces: host networking (not cluster-wide).
Official documentation
Did this work for you?
No votes yet. Be the first.
If it did not work, the report form below tells the editors what went wrong.
See also
- 0100 Create a VM and a cloud-init template with qm Create KVM virtual machines from the command line with qm, then build a reusable cloud-init template from a cloud image and clone… Intermediate · Step by step · Linux Article Basics · VMs & containers 15 Oct 2026
- 0101 Create LXC containers with pct and pveam Download a container template with pveam, create an unprivileged LXC container with pct, give it a network address and get a shell… Beginner · Step by step · Linux Article VMs & containers 15 Oct 2026
- 0104 Build a Proxmox VE cluster with pvecm and live-migrate VMs Join Proxmox VE nodes into a cluster with pvecm create and pvecm add, check quorum with pvecm status, then move running VMs… Advanced · Step by step · Linux Article Clusters & high availability · VMs & containers 15 Oct 2026
- 0105 High availability in Proxmox VE: HA resources, fencing and affinity rules Proxmox VE HA restarts VMs and containers on another node when a node fails. Learn the requirements, how watchdog fencing protects your… Advanced · Explains an idea · Linux Article Clusters & high availability 15 Oct 2026
- 0108 List all Proxmox VE guests with status and locks (pvesh + jq) A Bash script that lists every VM and container in the cluster with node, status, lock, memory and uptime, using the Proxmox… Intermediate · Cheat sheet · Linux Script Shell scripting · VMs & containers 15 Oct 2026
- 0110 Fix: TASK ERROR: VM is locked (backup) A VM or container still carries a backup lock, usually after a backup was interrupted. Check that no backup is running, then… Beginner · Fixes an error · Linux Article Backup & restore · VMs & containers 15 Oct 2026
Repos in the wild
- proxmox/qemu-server: the Proxmox VE virtual machine manager proxmox/qemu-server Read-only GitHub mirror of qemu-server, the Proxmox VE package that manages QEMU/KVM virtual machines and provides the qm and qmrestore commands. GitHub
History
Every saved edit is kept. The plot on the sleeve draws one line per edit. Open any edit to see exactly what changed.
- Commitpedia +3,227 chars