Run these as root in the Proxmox host's shell, either over SSH or from the Shell button in the web interface. Written for Proxmox VE 8 and 9. IDs such as 100 and 200, and names such as local-lvm, nas-backup and pve2, are examples, so swap in your own.

Host and updates #

  • Show the Proxmox VE versionProxmox VE
    pveversion
  • Show the version of every Proxmox packageProxmox VE
    pveversion -v
  • Show the node's CPU, memory and uptimeProxmox VE
    pvesh get /nodes/$(hostname)/status
  • Show every VM, container and storage in the clusterProxmox VE
    pvesh get /cluster/resources
  • Show the next free VM or container IDProxmox VE
    pvesh get /cluster/nextid
  • Show the subscription statusProxmox VE
    pvesubscription get
  • List the package repositories in useProxmox VE
    cat /etc/apt/sources.list.d/*
  • Update the hostProxmox VE
    apt update && apt full-upgrade
  • List recent tasks, such as backups and migrationsProxmox VE
    pvenode task list
  • Check the Proxmox services are runningProxmox VE
    systemctl status pveproxy pvedaemon pvestatd pve-cluster
  • Restart the web interfaceProxmox VE
    systemctl restart pveproxy
  • Restart the Proxmox servicesProxmox VE
    systemctl restart pvedaemon pveproxy pvestatd
  • Renew the node's web certificatesProxmox VE
    pvecm updatecerts --force
  • Collect a full system report for troubleshootingProxmox VE
    pvereport
  • Restart the hostProxmox VE
    reboot

    Warning: VMs and containers without HA are shut down and only start again if they're set to start at boot.

VMs: everyday #

  • List VMsProxmox VE
    qm list
  • Show a VM's statusProxmox VE
    qm status 100
  • Show a VM's settingsProxmox VE
    qm config 100
  • Start a VMProxmox VE
    qm start 100
  • Shut a VM down cleanlyProxmox VE
    qm shutdown 100
  • Shut a VM down, waiting up to 2 minutesProxmox VE
    qm shutdown 100 --timeout 120
  • Restart a VM cleanlyProxmox VE
    qm reboot 100
  • Stop a VM immediatelyProxmox VE
    qm stop 100

    Warning: Like pulling the power, so unsaved data in the VM may be lost.

  • Stop a VM that's stuck with a lockProxmox VE
    qm stop 100 --skiplock

    Warning: Like pulling the power, so unsaved data in the VM may be lost.

  • Reset a VMProxmox VE
    qm reset 100

    Warning: Like pressing the reset button, so unsaved data in the VM may be lost.

  • Pause a VMProxmox VE
    qm suspend 100
  • Resume a paused VMProxmox VE
    qm resume 100
  • Remove a stuck lock from a VMProxmox VE
    qm unlock 100
  • Start a VM when the host bootsProxmox VE
    qm set 100 --onboot 1
  • Open a VM's serial consoleProxmox VE
    qm terminal 100
  • Open a VM's QEMU monitorProxmox VE
    qm monitor 100

VMs: create and change #

  • Create a VM that boots from an ISOProxmox VE
    qm create 100 --name web01 --memory 2048 --cores 2 --ostype l26 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci --scsi0 local-lvm:32 --ide2 local:iso/ubuntu-24.04-live-server-amd64.iso,media=cdrom --boot order='scsi0;ide2'
  • Change a VM's memoryProxmox VE
    qm set 100 --memory 4096
  • Change a VM's CPU coresProxmox VE
    qm set 100 --cores 4
  • Use the host's CPU type for best performanceProxmox VE
    qm set 100 --cpu host
  • Add a disk to a VMProxmox VE
    qm set 100 --scsi1 local-lvm:50
  • Make a VM's disk biggerProxmox VE
    qm disk resize 100 scsi0 +10G

    Warning: Disks can only grow. You'll also need to grow the partition inside the VM.

  • Move a VM's disk to other storage and remove the old copyProxmox VE
    qm disk move 100 scsi0 local-zfs --delete 1
  • Import a disk image into a VMProxmox VE
    qm disk import 100 debian.qcow2 local-lvm
  • Insert an ISO into a VM's CD driveProxmox VE
    qm set 100 --ide2 local:iso/virtio-win.iso,media=cdrom
  • Eject a VM's ISOProxmox VE
    qm set 100 --ide2 none,media=cdrom
  • Change the boot orderProxmox VE
    qm set 100 --boot order=scsi0
  • Add a second network card on another VLANProxmox VE
    qm set 100 --net1 virtio,bridge=vmbr0,tag=20
  • Turn on the QEMU guest agent optionProxmox VE
    qm set 100 --agent enabled=1
  • Run a command inside a VM through the guest agentProxmox VE
    qm guest exec 100 -- uptime
  • Show a VM's IP addresses through the guest agentProxmox VE
    qm guest cmd 100 network-get-interfaces
  • Add a serial console to a VMProxmox VE
    qm set 100 --serial0 socket --vga serial0
  • Pass a USB device through to a VMProxmox VE
    qm set 100 --usb0 host=1234:5678
  • Pass a PCI device, such as a GPU, through to a VMProxmox VE
    qm set 100 --machine q35 --hostpci0 0000:01:00.0,pcie=1
  • Delete a VM and its disksProxmox VE
    qm destroy 100 --purge

    Warning: Deletes the VM and its disks, and can't be undone.

Templates, clones and cloud-init #

  • Build an Ubuntu cloud-init templateProxmox VE
    wget https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img qm create 9000 --name ubuntu-template --memory 2048 --cores 2 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci qm set 9000 --scsi0 local-lvm:0,import-from=/root/noble-server-cloudimg-amd64.img qm set 9000 --ide2 local-lvm:cloudinit --boot order=scsi0 --serial0 socket --vga serial0 --agent enabled=1 qm template 9000
  • Set a VM's cloud-init user, SSH key and networkProxmox VE
    qm set 9000 --ciuser gerard --sshkeys ~/.ssh/id_ed25519.pub --ipconfig0 ip=dhcp
  • Give a cloud-init VM a static IP addressProxmox VE
    qm set 101 --ipconfig0 ip=192.168.1.50/24,gw=192.168.1.1
  • Show the cloud-init settings a VM will getProxmox VE
    qm cloudinit dump 9000 user
  • Rebuild a VM's cloud-init drive after changesProxmox VE
    qm cloudinit update 9000
  • Turn a VM into a templateProxmox VE
    qm template 9000

    Warning: A template can't be started, and you can't turn it back into a normal VM.

  • Make a full clone of a templateProxmox VE
    qm clone 9000 101 --name web02 --full
  • Make a linked clone of a templateProxmox VE
    qm clone 9000 102 --name web03

Snapshots and migration #

  • Take a snapshot of a VMProxmox VE
    qm snapshot 100 before-upgrade --description "Before upgrading"
  • Take a snapshot of a VM including its memoryProxmox VE
    qm snapshot 100 before-upgrade --vmstate 1
  • List a VM's snapshotsProxmox VE
    qm listsnapshot 100
  • Roll a VM back to a snapshotProxmox VE
    qm rollback 100 before-upgrade

    Warning: Loses everything that changed in the VM since the snapshot.

  • Delete a VM snapshotProxmox VE
    qm delsnapshot 100 before-upgrade
  • Move a running VM to another nodeProxmox VE
    qm migrate 100 pve2 --online
  • Move a running VM with local disks to another nodeProxmox VE
    qm migrate 100 pve2 --online --with-local-disks

Containers (LXC) #

  • List containersProxmox VE
    pct list
  • Show a container's statusProxmox VE
    pct status 200
  • Show a container's settingsProxmox VE
    pct config 200
  • Start a containerProxmox VE
    pct start 200
  • Shut a container down cleanlyProxmox VE
    pct shutdown 200
  • Restart a containerProxmox VE
    pct reboot 200
  • Stop a container immediatelyProxmox VE
    pct stop 200

    Warning: Processes in the container can't shut down cleanly.

  • Open a shell in a containerProxmox VE
    pct enter 200
  • Run a command in a containerProxmox VE
    pct exec 200 -- apt update
  • Open a container's consoleProxmox VE
    pct console 200
  • Create an unprivileged containerProxmox VE
    pct create 200 local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst --hostname app01 --memory 1024 --cores 2 --rootfs local-lvm:8 --net0 name=eth0,bridge=vmbr0,ip=dhcp --unprivileged 1 --ssh-public-keys ~/.ssh/id_ed25519.pub
  • Change a container's memoryProxmox VE
    pct set 200 --memory 2048
  • Make a container's disk biggerProxmox VE
    pct resize 200 rootfs +4G

    Warning: Disks can only grow.

  • Share a host folder with a containerProxmox VE
    pct set 200 --mp0 /mnt/data,mp=/mnt/data
  • Let a container run DockerProxmox VE
    pct set 200 --features nesting=1,keyctl=1
  • Start a container when the host bootsProxmox VE
    pct set 200 --onboot 1
  • Copy a file into a containerProxmox VE
    pct push 200 ./config.yml /etc/app/config.yml
  • Copy a file out of a containerProxmox VE
    pct pull 200 /var/log/app.log ./app.log
  • Take a snapshot of a containerProxmox VE
    pct snapshot 200 before-upgrade
  • List a container's snapshotsProxmox VE
    pct listsnapshot 200
  • Roll a container back to a snapshotProxmox VE
    pct rollback 200 before-upgrade

    Warning: Loses everything that changed in the container since the snapshot.

  • Clone a containerProxmox VE
    pct clone 200 201 --hostname app02 --full
  • Turn a container into a templateProxmox VE
    pct template 200

    Warning: A template can't be started, and you can't turn it back into a normal container.

  • Move a container to another nodeProxmox VE
    pct migrate 200 pve2 --restart
  • Remove a stuck lock from a containerProxmox VE
    pct unlock 200
  • Check a stopped container's filesystemProxmox VE
    pct fsck 200
  • Delete a container and its disksProxmox VE
    pct destroy 200 --purge

    Warning: Deletes the container and its disks, and can't be undone.

Container templates #

  • Update the list of container templatesProxmox VE
    pveam update
  • List the container templates you can downloadProxmox VE
    pveam available --section system
  • Download a container templateProxmox VE
    pveam download local debian-12-standard_12.7-1_amd64.tar.zst
  • List downloaded container templatesProxmox VE
    pveam list local

Storage #

  • Show each storage, its type and free spaceProxmox VE
    pvesm status
  • List what's on a storageProxmox VE
    pvesm list local
  • List the ISO images on a storageProxmox VE
    pvesm list local --content iso
  • List the NFS shares a server offersProxmox VE
    pvesm scan nfs 192.168.1.5
  • Add an NFS share for backups and ISOsProxmox VE
    pvesm add nfs nas-backup --server 192.168.1.5 --export /volume1/proxmox --content backup,iso
  • Add a local folder as storageProxmox VE
    pvesm add dir usb-backup --path /mnt/usb --content backup
  • Turn off a storage without removing itProxmox VE
    pvesm set nas-backup --disable 1
  • Remove a storage from Proxmox, leaving its filesProxmox VE
    pvesm remove nas-backup
  • Show thin-pool and volume usageProxmox VE
    lvs
  • List disks and partitionsProxmox VE
    lsblk
  • Show a disk's SMART healthProxmox VE
    smartctl -a /dev/sda
  • Wipe a disk so Proxmox can reuse itProxmox VE
    wipefs -a /dev/sdb

    Warning: Erases the disk's partition table and data. Check the disk name with lsblk first.

ZFS #

  • Show ZFS pool healthProxmox VE
    zpool status
  • Show ZFS pool size and free spaceProxmox VE
    zpool list
  • List ZFS datasets and volumesProxmox VE
    zfs list
  • Check a ZFS pool for errors (scrub)Proxmox VE
    zpool scrub rpool
  • Create a mirrored ZFS pool and add it as storageProxmox VE
    zpool create -o ashift=12 tank mirror /dev/disk/by-id/ata-DISK1 /dev/disk/by-id/ata-DISK2 pvesm add zfspool tank --pool tank --content images,rootdir

    Warning: Erases both disks. Check the disk IDs with ls -l /dev/disk/by-id first.

  • Show how much memory the ZFS cache is usingProxmox VE
    arc_summary | head -30

Backups and restores #

  • Back up a VM nowProxmox VE
    vzdump 100 --storage nas-backup --mode snapshot --compress zstd
  • Back up several VMs and containersProxmox VE
    vzdump 100 101 200 --storage nas-backup --mode snapshot --compress zstd
  • Back up everything on this nodeProxmox VE
    vzdump --all --storage nas-backup --mode snapshot --compress zstd
  • Back up everything except some guestsProxmox VE
    vzdump --all --exclude 999 --storage nas-backup --mode snapshot --compress zstd
  • Back up a VM with it shut down, for a fully consistent copyProxmox VE
    vzdump 100 --storage nas-backup --mode stop --compress zstd
  • Add a note to a backupProxmox VE
    vzdump 100 --storage nas-backup --mode snapshot --notes-template "{{guestname}} before upgrade"
  • List backups on a storageProxmox VE
    pvesm list nas-backup --content backup
  • Show scheduled backup jobsProxmox VE
    cat /etc/pve/jobs.cfg
  • Restore a VM backup as a new VMProxmox VE
    qmrestore /mnt/pve/nas-backup/dump/vzdump-qemu-100-2026_11_13-02_00_00.vma.zst 110 --storage local-lvm
  • Restore a VM backup over the existing VMProxmox VE
    qmrestore /mnt/pve/nas-backup/dump/vzdump-qemu-100-2026_11_13-02_00_00.vma.zst 100 --force

    Warning: Replaces the VM and its disks with the backup.

  • Restore a container backup as a new containerProxmox VE
    pct restore 210 /mnt/pve/nas-backup/dump/vzdump-lxc-200-2026_11_13-02_00_00.tar.zst --storage local-lvm

Clusters and HA #

  • Create a clusterProxmox VE
    pvecm create homelab
  • Join this node to a clusterProxmox VE
    pvecm add 192.168.1.10
  • Show the cluster and quorum statusProxmox VE
    pvecm status
  • List the nodes in the clusterProxmox VE
    pvecm nodes
  • Show corosync link statusProxmox VE
    corosync-cfgtool -s
  • Show cluster logsProxmox VE
    journalctl -u corosync -u pve-cluster
  • Let a node work alone when the others are downProxmox VE
    pvecm expected 1

    Warning: Can cause the same VM to run twice if other nodes come back. Only use it when you're sure they're off.

  • Remove a node from the clusterProxmox VE
    pvecm delnode pve3

    Warning: Shut the node down first and never bring it back with its old setup.

  • Show HA statusProxmox VE
    ha-manager status
  • Add a VM to HAProxmox VE
    ha-manager add vm:100
  • Remove a VM from HAProxmox VE
    ha-manager remove vm:100

Networking and firewall #

  • Show the host's interfaces and bridgesProxmox VE
    ip -br addr
  • Show the host's network configProxmox VE
    cat /etc/network/interfaces
  • Apply network config changes without a rebootProxmox VE
    ifreload -a

    Warning: A mistake can cut off your connection to the host, so have console access ready.

  • Show the Proxmox firewall statusProxmox VE
    pve-firewall status
  • Check firewall rules compile without errorsProxmox VE
    pve-firewall compile
  • Stop the Proxmox firewallProxmox VE
    pve-firewall stop

    Warning: Removes all firewall rules until you start it again.

  • Start the Proxmox firewallProxmox VE
    pve-firewall start

Users and API tokens #

  • List usersProxmox VE
    pveum user list
  • Add a Proxmox userProxmox VE
    pveum user add gerard@pve
  • Set a user's passwordProxmox VE
    pveum passwd gerard@pve
  • Give a user admin rights on everythingProxmox VE
    pveum acl modify / --users gerard@pve --roles PVEAdmin
  • List rolesProxmox VE
    pveum role list
  • Create an API token for automationProxmox VE
    pveum user token add gerard@pve automation --privsep 0

    Warning: The token's secret is shown once. Save it somewhere safe straight away.

  • Delete a userProxmox VE
    pveum user delete gerard@pve

Hardware and passthrough #

  • Check IOMMU is turned onProxmox VE
    dmesg | grep -e DMAR -e IOMMU
  • List IOMMU groupsProxmox VE
    find /sys/kernel/iommu_groups/ -type l
  • List PCI devices with their IDsProxmox VE
    lspci -nn
  • List USB devices with their IDsProxmox VE
    lsusb
  • Show CPU detailsProxmox VE
    lscpu

Troubleshooting #

  • Follow the system logProxmox VE
    journalctl -f
  • Show the web interface's log since bootProxmox VE
    journalctl -u pveproxy -b
  • Show the logs for a failed backup or taskProxmox VE
    pvenode task list --errors
  • Show the processes for a VMProxmox VE
    ps aux | grep "qemu.*-id 100"
  • Check the cluster filesystem is workingProxmox VE
    systemctl status pve-cluster
  • Show which VM disks use the most spaceProxmox VE
    lvs --sort -data_percent