
A Practical Guide for Managing Virtual Machines, Nodes, Storage & Networking via CLI
Proxmox VE provides a powerful web interface, but the command line offers speed, automation potential, and capabilities not exposed through the GUI. This cheat sheet collects the most useful qm, pct, and cluster commands for quick reference.
VM Management (KVM/QEMU) Container Management (LXC) Node & Cluster Management Storage Commands Networking Commands Helpful System Commands Backup & Restore Common Log Locations
1. Virtual Machine (QEMU/KVM) Commands
List All VMsqm list
Start a VM
qm start <VMID>
Stop a VM (graceful shutdown)
qm shutdown <VMID>
Force Stop a VM (hard power-off)
qm stop <VMID>
Reboot a VM
qm reboot <VMID>
Create a VM
qm create <VMID> --name <name> --memory <MB> --cores <n> --net0 virtio,bridge=vmbr0
Delete a VM
qm destroy <VMID>
View VM Configuration
qm config <VMID>
Clone a VM
qm clone <sourceVMID> <newVMID> --name <newName>
Migrate VM to Another Node
qm migrate <VMID> <targetNode>
2. LXC Container (pct) Commands
List Containers
pct list
Start a Container
pct start <CTID>
Stop a Container
pct stop <CTID>
Enter the Container Shell
pct enter <CTID>
Create a Container
pct create <CTID> <template> --hostname <name> --rootfs local-lvm:8 --net0 name=eth0,bridge=vmbr0,ip=dhcp
Destroy a Container
pct destroy <CTID>
3. Node & Cluster Management
Show Cluster Status
pvecm status
List Nodes
pvecm nodes
Add a New Node to the Cluster (run on new node)
pvecm add <IP-of-Master>
Remove a Node From Cluster
(Run on a healthy cluster node)
pvecm delnode <nodeName>
Rename a Node
hostnamectl set-hostname <newName>
(requires editing /etc/hosts + reboot)
4. Storage Commands
List All Storage
pvesm status
Scan Storage (LVM example)
pvesm lvmscan
Add Directory Storage
pvesm add dir <name> --path /mnt/data --content iso,backup,vztmpl
Remove Storage
pvesm remove <storageID>
5. Networking Commands
List Network Interfaces
ip a
Restart Network Service
systemctl restart networking
Show Proxmox Firewall Status
pve-firewall status
Reload Firewall
pve-firewall reload
6. Helpful System Commands
Check Disk Usaged
f -h
Check Memory Usage
free -h
Monitor System Load
top
Check Proxmox Version
pveversion -v
Update Proxmox
apt update && apt full-upgrade -y
7. Backup & Restore
Create Backup of a VM
vzdump <VMID> --storage <storageID> --compress zstd
Restore Backup
qmrestore /path/to/backup.vma.zst <VMID>
List Backups
vzdump --list <storageID>
8. Log & Troubleshooting Locations
VM Logs
/var/log/qemu-server/<VMID>.log
Container Logs
/var/log/pct/<CTID>.log
System Logs (journal)
journalctl -xe
Cluster Logs
journalctl -u corosync
Conclusion
This cheat sheet provides fast access to the most common and useful Proxmox VE CLI commands. Keep it bookmarked or saved in your terminal environment to speed up administration tasks—especially when automation, troubleshooting, or remote access is required.