Proxmox Commands – cheat sheet

Proxmox Commands – cheat sheet

Here’s a Proxmox command cheat sheet to help you navigate and manage Proxmox Virtual Environment (PVE) using the command line:

Proxmox Node Commands:

  1. Display Node Status:
    pveversion
  2. Check Node Resources:
    pvesh get /nodes/<node>/status
  3. List Virtual Machines:
    qm list
  4. Start/Stop/Shutdown a VM:
    qm start <vmid> qm stop <vmid> qm shutdown <vmid>
  5. Create a Virtual Machine:
    qm create <vmid> --name <vm_name> --memory <memory_size> --net0 virtio,bridge=vmbr0 --cores <cpu_cores> --sockets <cpu_sockets> --virtio0 local:<storage_id>:<vm_size>
  6. Show VM Configuration:
    qm config <vmid>
  7. Delete a Virtual Machine:
    qm destroy <vmid>
  8. Clone a Virtual Machine:
    qm clone <source_vmid> <new_vmid> --name <new_vm_name>
  9. Snapshot a Virtual Machine:
    qm snapshot <vmid> <snapshot_name>
  10. Restore VM from Snapshot:
    qm rollback <vmid> <snapshot_name>

Storage Commands:

  1. List Storage:
    pvesh get /storage
  2. Show Storage Configuration:
    pvesh get /storage/<storage_id>
  3. Create Storage:
    pvesh create /storage --storage <storage_id> --type <storage_type> --content <content_type> --path <storage_path>
  4. Remove Storage:
    pvesh delete /storage/<storage_id>

Networking Commands:

  1. List Network Interfaces:
    ifconfig -a
  2. List Bridges:
    brctl show
  3. List Firewall Rules:
    iptables -L -n
  4. Configure Network:
    nano /etc/network/interfaces

Cluster Commands:

  1. Display Cluster Status:
    pvecm status
  2. Join a Node to the Cluster:
    pvecm add <node_ip_or_hostname>
  3. Remove a Node from the Cluster:
    pvecm delnode <node_id>
  4. Show Quorum Status:
    pvecm quorum
  5. Display CIB (Cluster Information Base):
    corosync-cmapctl

Maintenance Commands:

  1. Update Proxmox VE:
    apt update apt dist-upgrade
  2. Reboot Node:
    reboot
  3. Check for Updates:
    pveupdate check
  4. Backup VM:
    vzdump <vmid> --compress <backup_type> --storage <storage_id>
  5. Restore VM from Backup:
    vzrestore <backup_file> <new_vmid>

These commands should help you perform various tasks and manage your Proxmox environment from the command line. Adjust the parameters based on your specific configurations and requirements.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.