The web UI covers most tasks, but Proxmox commands are faster for scripting, bulk changes and fixing things when the UI is unavailable. Run them as root on the node, through SSH or Node → Shell.
Before you start
- Root shell on a Proxmox node.
- Know your guest IDs:
qm listfor VMs,pct listfor containers.
Virtual machines with qm
| Task | Command |
|---|---|
| List VMs | qm list |
| Start / shutdown / stop | qm start 105, qm shutdown 105, qm stop 105 |
| Reboot | qm reboot 105 |
| Show config | qm config 105 |
| Change memory and cores | qm set 105 --memory 4096 --cores 2 |
| Grow a disk | qm resize 105 scsi0 +10G |
| Snapshot / rollback | qm snapshot 105 pre-update, qm rollback 105 pre-update |
| Clone | qm clone 9000 120 --name web2 --full |
| Remove a stale lock | qm unlock 105 |
| Delete VM | qm destroy 105 --purge |
Containers with pct
| Task | Command |
|---|---|
| List containers | pct list |
| Start / stop | pct start 110, pct stop 110 |
| Open a shell inside | pct enter 110 |
| Run one command | pct exec 110 -- apt update |
| Change resources | pct set 110 --memory 2048 --cores 2 |
| Grow root disk | pct resize 110 rootfs +5G |
Storage, cluster and backups
| Task | Command |
|---|---|
| Storage status | pvesm status |
| List content of a storage | pvesm list local |
| Cluster status | pvecm status |
| Back up a guest now | vzdump 105 --storage backups --mode snapshot --compress zstd |
| Restore a VM backup | qmrestore /path/vzdump-qemu-105.vma.zst 130 |
| Version info | pveversion -v |
Warning: qm destroy and qm stop act immediately with no confirmation. Double-check the ID first.
Troubleshooting
- "VM is locked": wait for the running task, then
qm unlock. - "no such VM": the VM lives on another cluster node; run the command there or check
pvesh get /cluster/resources.
Frequently asked questions
Is there an API for these?
Yes, pvesh calls the same REST API from the shell, and remote tools can use API tokens (API tokens).
Do CLI changes show in the web UI?
Yes, both edit the same configuration files.
Where are VM config files?
In /etc/pve/qemu-server/<id>.conf, and containers in /etc/pve/lxc/.
