Frequently Asked Question

HelpDesk Debug Proxmox
Last Updated 3 hours ago

When reporting a Proxmox issue, collecting relevant diagnostic information is crucial for efficient troubleshooting. The following commands provide comprehensive details about the Proxmox host, cluster, and virtual guests.

ALWAYS Capture

These commands provide general system health and configuration details.

System Information:

    hostnamectl
    uname -a

Proxmox Version Information:

    pveversion -v

Cluster Status and Quorum (if applicable):

    pvecm status
    quorum status

System Services Status:

    systemctl list-units --type=service --state=running
    systemctl status pveproxy pvedaemon pvescheduler pvestatd pve-cluster

Disk Usage:

    df -h

Hardware Information:

    lshw -short
    lscpu
    free -h

Network Configuration:

    ip a
    ip route
    cat /etc/network/interfaces

Journal Logs for Key Proxmox Services:

    journalctl -u pveproxy.service -n 50 --no-pager
    journalctl -u pvedaemon.service -n 50 --no-pager
    journalctl -u pve-cluster.service -n 50 --no-pager


    For Storage Issues

    These commands provide details specific to storage configurations and status.

        pvesm status
    

    LVM/LVM-thin Information (if in use):

        lvs --all
        vgs --all
    

    ZFS Information (if in use):

        zpool status -v
        zfs list
    

    Ceph Information (if in use):

        ceph status
        ceph osd tree
        ceph health detail
    

    IMPORTANT: If this is a CEPH issue, see the ceph requirements in the Ceph session of the knowledge base and use that instead. 

      For Guest (VM/Container) Issues

      These commands provide details about virtual machine and container configuration and status.

      List All Virtual Guests and Their Status:

          qm list
          lxc list
      

      Specific VM/Container Configuration (replace VMID or CTID):

          qm config <VMID>
          lxc config show <CTID>
      

      Specific VM/Container Status (replace VMID or CTID):

          qm status <VMID>
          lxc info <CTID>
      

      Console Logs for a Specific VM (replace VMID):

          journalctl -u qemu-server@<VMID>.service -n 50 --no-pager
      


        For Cluster Issues

        These commands provide additional information relevant to multi-node Proxmox clusters.

        Corosync Configuration:

            cat /etc/corosync/corosync.conf
        

        Corosync Logs:

            journalctl -u corosync.service -n 50 --no-pager
        


          Diagnostic Script (if not using Deploy's packaged scripts - which are better)

          The following script automates the collection of the most commonly required diagnostic information and saves it to a file named proxmox_diag_output.txt in the current directory.

          #!/bin/bash
          
          # Define the output file
          OUTPUT_FILE="proxmox_diag_output.txt"
          
          # Clear the output file if it exists
          > "$OUTPUT_FILE"
          
          echo "--- Proxmox Diagnostic Report ---" | tee -a "$OUTPUT_FILE"
          echo "Generated on: $(date)" | tee -a "$OUTPUT_FILE"
          echo "" | tee -a "$OUTPUT_FILE"
          
          # Function to run a command and append output
          run_command() {
              echo "--- Running: $1 ---" | tee -a "$OUTPUT_FILE"
              echo "" | tee -a "$OUTPUT_FILE"
              eval "$1" 2>&1 | tee -a "$OUTPUT_FILE"
              echo "" | tee -a "$OUTPUT_FILE"
              echo "-----------------------------------" | tee -a "$OUTPUT_FILE"
              echo "" | tee -a "$OUTPUT_FILE"
          }
          
          # General System and Proxmox Information
          run_command "hostnamectl"
          run_command "uname -a"
          run_command "pveversion -v"
          run_command "df -h"
          run_command "lshw -short"
          run_command "lscpu"
          run_command "free -h"
          run_command "ip a"
          run_command "ip route"
          run_command "cat /etc/network/interfaces"
          
          # Proxmox Cluster and Storage
          run_command "pvecm status"
          run_command "quorum status"
          run_command "pvesm status"
          run_command "cat /etc/pve/storage.cfg"
          run_command "cat /etc/pve/datacenter.cfg"
          
          # Proxmox Services Status
          run_command "systemctl list-units --type=service --state=running"
          run_command "systemctl status pveproxy pvedaemon pvescheduler pvestatd pve-cluster"
          run_command "journalctl -u pveproxy.service -n 50 --no-pager"
          run_command "journalctl -u pvedaemon.service -n 50 --no-pager"
          run_command "journalctl -u pve-cluster.service -n 50 --no-pager"
          
          # VM and Container Information
          run_command "qm list"
          run_command "lxc list"
          run_command "cat /etc/pve/qemu-server/*.conf"
          run_command "cat /etc/pve/lxc/*.conf"
          
          # Storage Specifics (if applicable, these might error if not installed, which is fine)
          run_command "lvs --all"
          run_command "vgs --all"
          run_command "zpool status -v"
          run_command "zfs list"
          run_command "ceph status"
          run_command "ceph osd tree"
          run_command "ceph health detail"
          
          # Cluster Specifics (if applicable)
          run_command "cat /etc/corosync/corosync.conf"
          run_command "journalctl -u corosync.service -n 50 --no-pager"
          
          echo "--- End of Report ---" | tee -a "$OUTPUT_FILE"
          echo "Diagnostic information saved to $OUTPUT_FILE"
          
          # Optional: Add instructions for how to retrieve the file
          echo "To retrieve this file, you can use 'scp' or copy its content manually."
          

          To use the script:

              nano diag.sh
          
              chmod +x diag.sh
          
              ./diag.sh
          
          1. Log in to the Proxmox host via SSH.
          2. Create a new file, for example, diag.sh:
          3. Paste the script content into the file and save it (Ctrl+X, Y, Enter for Nano).
          4. Make the script executable:
          5. Run the script:
          6. The output will be saved to proxmox_diag_output.txt. Attach this file to your helpdesk ticket.


          This website relies on temporary cookies to function, but no personal data is ever stored in the cookies.
          OK
          Powered by GEN UK CLEAN GREEN ENERGY

          Loading ...