Skip to content

Instantly share code, notes, and snippets.

@cywf
Last active February 6, 2025 14:42
Show Gist options
  • Save cywf/973f9180269ad66418b392be25a5a373 to your computer and use it in GitHub Desktop.
Save cywf/973f9180269ad66418b392be25a5a373 to your computer and use it in GitHub Desktop.
Guide for maintaining and configuring Proxmox

Proxmox Maintenance and Configuration Guide

alt-text

Table of Contents

  1. Introduction
  2. Configuring Updates
  3. Enabling Notifications
  4. Setting Up Trusted TLS Certificates
  5. Storage Options and Configuration
  6. Setting Up Backup Jobs
  7. Enabling PCI Passthrough
  8. VM Best Practices
  9. Creating VM Templates
  10. Additional Resources

Introduction

Proxmox Virtual Environment (PVE) is an open-source server virtualization management solution that combines KVM hypervisor and LXC containers on a single platform. It's highly efficient, versatile, and supports advanced features like clustering, software-defined storage, and networking.

This guide will walk you through the essential configurations, best practices, and troubleshooting tips to ensure your Proxmox environment is secure, reliable, and optimized for both personal and enterprise-level deployments.

Configuring Updates

Keeping your Proxmox environment updated is crucial for security and performance.

1. Disable Enterprise Repositories (if not subscribed):

  • Navigate to Datacenter > Updates.
  • Remove any entries starting with Enterprise.
  • Add the No-Subscription repository:
    echo "deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
  • Run:
    apt update
    apt dist-upgrade
  • Refresh the updates section in the GUI and apply updates as needed.

2. Enable Automatic Updates:

  • Consider setting up a cron job to check for updates regularly:
    crontab -e
  • Add:
    0 4 * * 1 apt update && apt -y dist-upgrade && apt autoremove -y

Enabling Notifications

Stay informed about the status of your Proxmox environment by configuring notifications.

1. Set Up SMTP Notifications:

  • Navigate to Datacenter > Notifications.
  • Add your SMTP server information and test the configuration.
  • Configure notification matchers to alert on backup failures, disk issues, and system alerts.

Setting Up Trusted TLS Certificates

A trusted TLS certificate ensures secure and trusted connections to your Proxmox environment.

1. Prepare Your Environment:

  • Ensure you have a public domain and a DNS provider like Cloudflare.
  • Configure DNS records to point to your Proxmox nodes.

2. Issue a Certificate Using ACME:

  • Navigate to Datacenter > ACME.
  • Set up a DNS challenge using your DNS provider's API token.
  • Apply the certificate to your Proxmox nodes.

Storage Options and Configuration

Optimizing storage is essential for performance and reliability.

1. Add Storage Locations:

  • Navigate to Datacenter > Storage.
  • Add storage options like NFS, ZFS, or LVM depending on your environment.

2. Configure Redundant Storage:

  • Use RAID or other redundancy methods to ensure data integrity.
  • Consider using an external NAS for VM backups.

Setting Up Backup Jobs

Backups are crucial for disaster recovery.

1. Create Backup Jobs:

  • Navigate to Datacenter > Backup.
  • Select the VMs to back up, set the schedule, and choose the storage location.
  • Enable email notifications for backup job results.

2. Test Your Backups:

  • Regularly test restoring backups to ensure they are working correctly.

Enabling PCI Passthrough

PCI Passthrough allows direct access to hardware devices for VMs.

1. Enable IOMMU:

  • Ensure IOMMU is enabled in your BIOS.
  • Verify in Proxmox:
    dmesg | grep -e DMAR -e IOMMU

2. Assign Devices to VMs:

  • In the VM hardware section, add a PCI device, selecting the desired hardware.

VM Best Practices

Optimizing VM settings can enhance performance and stability.

1. Select the Correct OS Type:

  • For Linux VMs, select the latest kernel and enable QEMU guest agent.
  • For Windows, ensure VirtIO drivers are included during installation.

2. Optimize Hardware Settings:

  • Use VirtIO for disk and network devices.
  • Enable Q35 machine type and OVMF BIOS for modern hardware compatibility.

Creating VM Templates

VM templates simplify the deployment of similar VMs.

1. Prepare a Base VM:

  • Install the OS, apply updates, and configure basic settings.
  • Remove SSH keys and reset machine IDs.

2. Convert VM to Template:

  • Right-click on the VM and select Convert to Template.
  • Clone new VMs from this template for quick deployment.

Additional Resources

For more detailed guidance, check out the following videos:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment