Proxmox Commands

Proxmox VE CLI commands for virtualization management.

Node Startup Procedure

Step 1: Power on Proxmox node

Boot the physical server

Step 2: Wait for node boot

Wait 3-5 minutes for Proxmox services to start

Step 3: Verify node status

Check Proxmox services are running

pveversion

Verify Proxmox version

systemctl status pve-cluster

Check cluster service status

systemctl status pvedaemon

Check daemon service status

Step 4: VMs/CTs auto-start

Guests with auto-start enabled will boot automatically

qm list

List all VMs and their states

pct list

List all containers and their states

Step 5: Verify cluster status

Ensure node rejoins cluster (if clustered)

pvecm status

Check cluster status

Node Shutdown Procedure

Step 1: Migrate or shutdown VMs/CTs

Move or stop guests before node shutdown

qm list

List all VMs to identify running ones

pct list

List all containers to identify running ones

qm shutdown <vmid>

Gracefully shutdown VM

pct shutdown <ctid>

Gracefully shutdown container

Step 2: Migrate HA resources (if clustered)

Move HA resources to other nodes

ha-manager migrate <vmid> <target_node>

Migrate HA resource to another node

Step 3: Check storage sync

Ensure replication is complete

pvesr status

Check replication status

Step 4: Shutdown node

Gracefully shutdown Proxmox node

shutdown -h now

Shutdown the node immediately

reboot

Reboot the node (alternative)

System Information

pveversion

Display Proxmox VE version

pveversion -v

Display detailed version info

pvesh get /version

Get version via API shell

pvesh get /cluster/status

Get cluster status

pvesh get /nodes

List all nodes

pvenode status

Display node status

uptime

Display system uptime

df -h

Display disk usage

free -h

Display memory usage

Virtual Machine (QEMU/KVM)

qm list

List all VMs

qm status <vmid>

Get VM status

qm start <vmid>

Start VM

qm shutdown <vmid>

Shutdown VM gracefully

qm stop <vmid>

Stop VM forcefully

qm reboot <vmid>

Reboot VM

qm reset <vmid>

Reset VM (hard reboot)

qm suspend <vmid>

Suspend VM

qm resume <vmid>

Resume suspended VM

qm create <vmid> --name <name> --memory <mb> --cores <num>

Create new VM

qm clone <vmid> <newvmid> --name <name>

Clone VM

qm destroy <vmid>

Delete VM

qm config <vmid>

Display VM configuration

qm set <vmid> --memory <mb>

Set VM memory

qm set <vmid> --cores <num>

Set VM CPU cores

qm monitor <vmid>

Enter QEMU monitor

qm terminal <vmid>

Open VM console

qm unlock <vmid>

Unlock VM

Container (LXC)

pct list

List all containers

pct status <ctid>

Get container status

pct start <ctid>

Start container

pct shutdown <ctid>

Shutdown container gracefully

pct stop <ctid>

Stop container forcefully

pct reboot <ctid>

Reboot container

pct create <ctid> <template> --hostname <name> --memory <mb>

Create container

pct destroy <ctid>

Delete container

pct enter <ctid>

Enter container shell

pct exec <ctid> -- <command>

Execute command in container

pct config <ctid>

Display container configuration

pct set <ctid> --memory <mb>

Set container memory

pct set <ctid> --cores <num>

Set container CPU cores

pct unlock <ctid>

Unlock container

pct console <ctid>

Open container console

Snapshot Management

qm snapshot <vmid> <snapname>

Create VM snapshot

qm listsnapshot <vmid>

List VM snapshots

qm rollback <vmid> <snapname>

Rollback VM to snapshot

qm delsnapshot <vmid> <snapname>

Delete VM snapshot

pct snapshot <ctid> <snapname>

Create container snapshot

pct listsnapshot <ctid>

List container snapshots

pct rollback <ctid> <snapname>

Rollback container to snapshot

pct delsnapshot <ctid> <snapname>

Delete container snapshot

Storage Management

pvesm status

Display storage status

pvesm list <storage>

List content in storage

pvesm alloc <storage> <vmid> <filename> <size>

Allocate disk image

pvesm free <volume>

Free storage volume

pvesm scan nfs <server>

Scan for NFS exports

pvesm scan iscsi <portal>

Scan for iSCSI targets

pvesm add nfs <storage> --server <ip> --export <path>

Add NFS storage

pvesm remove <storage>

Remove storage

lvs

List LVM logical volumes

vgs

List LVM volume groups

pvs

List LVM physical volumes

zpool status

Display ZFS pool status

zpool list

List ZFS pools

zfs list

List ZFS datasets

Network Configuration

ip addr show

Display network interfaces

ip route show

Display routing table

brctl show

Display Linux bridges

ovs-vsctl show

Display Open vSwitch configuration

ovs-vsctl list-br

List OVS bridges

pvesh get /nodes/<node>/network

Get node network config via API

cat /etc/network/interfaces

View network configuration file

systemctl restart networking

Restart networking service

ifreload -a

Reload network interfaces

Cluster Management

pvecm status

Display cluster status

pvecm nodes

List cluster nodes

pvecm create <clustername>

Create new cluster

pvecm add <master_ip>

Join existing cluster

pvecm delnode <nodename>

Remove node from cluster

pvecm expected 1

Set expected votes (quorum recovery)

pvecm updatecerts

Update cluster certificates

ha-manager status

Display HA status

ha-manager add <vmid>

Add resource to HA

ha-manager remove <vmid>

Remove resource from HA

Backup & Restore

vzdump <vmid>

Backup VM or container

vzdump <vmid> --mode snapshot --compress lzo

Backup with snapshot and compression

vzdump --all

Backup all VMs and containers

qmrestore <backup> <vmid>

Restore VM from backup

pct restore <ctid> <backup>

Restore container from backup

pvesh get /cluster/backup

List backup jobs

ls /var/lib/vz/dump/

List backup files

User & Permission

pveum user list

List users

pveum user add <username>@<realm> --password <password>

Add user

pveum user delete <username>@<realm>

Delete user

pveum passwd <username>@<realm>

Change user password

pveum group list

List groups

pveum group add <groupname>

Create group

pveum acl list

List ACLs

pveum role list

List roles

Service Management

systemctl status pve-cluster

Check cluster service status

systemctl status pveproxy

Check web interface status

systemctl status pvedaemon

Check daemon status

systemctl status pvestatd

Check statistics daemon status

systemctl restart pveproxy

Restart web interface

systemctl restart pvedaemon

Restart daemon

systemctl restart pve-cluster

Restart cluster service

pvesr status

Display replication status

Updates & Packages

apt update

Update package lists

apt dist-upgrade

Upgrade all packages

pveupdate

Check for Proxmox updates

pve6to7

Check PVE 6 to 7 upgrade readiness

pve7to8

Check PVE 7 to 8 upgrade readiness

apt install <package>

Install package

apt remove <package>

Remove package

apt list --installed

List installed packages

Monitoring & Logs

pvesh get /cluster/resources

Get cluster resource usage

pvesh get /nodes/<node>/status

Get node status

top

Display running processes

htop

Interactive process viewer

journalctl -f

Follow system journal

journalctl -u pveproxy

View pveproxy logs

tail -f /var/log/syslog

Monitor syslog

tail -f /var/log/pve/tasks/active

Monitor active tasks

qm showcmd <vmid>

Display QEMU command line

pveperf

Run performance benchmark