Coder Social home page Coder Social logo

proxmoxve's Introduction

ProxmoxVE (PVE)

Describes how to setup Proxmox VE 6.2 with ZFS and device passthrough (Intel CPU).

Hardware used

Supermicro X11SCZ-F using C246 chipset.

Intel I3-9300 with integrated UHD630 GPU.

Micron 18ASF2G72AZ-2G3B1, 16GiB * 4 sticks

Two NVMe SSD drives for ZFS on root mirror (SK hynix Gold P31 1TB, SHGP31-1000GM-2)

BIOS changes

Enable VT-d, VT-x, etc.

Enable ASPM or set to Auto.

Enable UEFI boot.

Set primary display to PCI and enable Internal Graphics option to be able to passthrough integrated GPU.

Enable IOMMU

Edit systemd-boot file nano /etc/kernel/cmdline by adding intel_iommu=on iommu=pt options.

Apply changes by executing pve-efiboot-tool refresh

Add kernel modules

Add required modules nano /etc/modules:

vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

Apply changes by executing update-initramfs -u -k all

Verify configuration

Reboot the host

Execute dmesg | grep -e DMAR -e IOMMU and check the output for:

[    0.103246] DMAR: IOMMU enabled
[    0.172321] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[    0.175358] DMAR-IR: Enabled IRQ remapping in x2apic mode
[    0.913016] DMAR: Intel(R) Virtualization Technology for Directed I/O

Device blacklisting

Prevent passthrough devices from host loading by editing nano /etc/modprobe.d/blacklist.conf. For example:

blacklist snd_hda_intel
blacklist snd_hda_codec_hdmi
blacklist i915

GPU passthrough

All functions [Y]
ROM-Bar [Y]
PCI-Express [Y]

NIC passthrough

Tested on Intel I350-T4. Each nic must be in its own iommu group. When passing through individual nics, do not enable All Functions or ROM-Bar.

Enable updates for Proxmox free version

rm /etc/apt/sources.list.d/pve-enterprise.list
echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
apt update
apt full-upgrade

Reduce rpool disk writes

Proxmox writes lots of logs to disk and will wear out SSDs fast. Remove any logging you don't need. For standalone PVE, some services can be disabled.

systemctl stop pve-ha-lrm.service
systemctl stop pve-ha-crm.service
systemctl disable pve-ha-lrm.service
systemctl disable pve-ha-crm.service

For single box PVE, make timer not run too often by setting OnCalendar=monthly

systemctl edit --full pvesr.timer
systemctl daemon-reload

Enable SSD autotrim.

zpool set autotrim=on rpool

To manually trim, execute zpool trim.

Check time before async writes are written to disk. Increased timeout reduces SSD wear.

cat /sys/module/zfs/parameters/zfs_txg_timeout

Set async write timeout temporarily to see impact.

echo 30 > /sys/module/zfs/parameters/zfs_txg_timeout

To preserve zfs_txg_timeout across reboots, modify config to include options zfs zfs_txg_timeout=30 line.

nano /etc/modprobe.d/zfs.conf
update-initramfs -u
pve-efiboot-tool refresh

References

Create USB installer

Admin Guide PCI passthrough

Pci passthrough

Qemu/KVM Virtual Machines Wiki

Qemu/KVM Virtual Machines Docs

Windows 10 guest best practices

PCI passthrough via OVMF

Proxmox ZFS on Linux

ZFS Module Parameters

Proxmox service daemons

proxmoxve's People

Contributors

magole avatar

Stargazers

 avatar tommy avatar  avatar Jeffrey Carpenter avatar Giovanni Cammisa avatar dn4hc avatar Jobggun avatar  avatar Vedat Kamer avatar

Watchers

Vedat Kamer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.