Subject: Seeking Guidance on Passing GPU to Virtual Machine in Proxmox

Sprout

New Member
Nov 10, 2023
3
0
1
Hello Community,

I hope you are all doing well. I'm facing a challenge and am seeking your assistance. I'm planning to use Proxmox to pass a GPU to a virtual machine and would like to hear about your experiences and advice on this matter.
My goal is to utilize GPU resources in a virtual environment, especially for graphics-intensive applications within a virtual machine. I've already installed Proxmox and set up basic virtual machines, but passing a GPU is new territory for me.

Here my Hardware:

Fujitsu Esprimo P720​

- Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
- MOBO D3221-A12
- 32 GB RAM
- Geforce GTX770

I followed https://pve.proxmox.com/wiki/PCI_Passthrough#Verifying_IOMMU_parameters
Here is the output:
root@p720:~# dmesg | grep -e DMAR -e IOMMU [ 0.008111] ACPI: DMAR 0x00000000DE05BDB0 000080 (v01 INTEL HSW 00000001 INTL 00000001) [ 0.008125] ACPI: Reserving DMAR table memory at [mem 0xde05bdb0-0xde05be2f] [ 0.132941] DMAR: Host address width 39 [ 0.132943] DMAR: DRHD base: 0x000000fed90000 flags: 0x1 [ 0.132949] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap d2008c20660462 ecap f010da [ 0.132953] DMAR: RMRR base: 0x000000df65d000 end: 0x000000df66cfff [ 0.132957] DMAR-IR: IOAPIC id 8 under DRHD base 0xfed90000 IOMMU 0 [ 0.132959] DMAR-IR: HPET id 0 under DRHD base 0xfed90000 [ 0.132961] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping. [ 0.133236] DMAR-IR: Enabled IRQ remapping in x2apic mode root@p720:~# dmesg | grep 'remapping' [ 0.132961] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping. [ 0.133236] DMAR-IR: Enabled IRQ remapping in x2apic mode root@p720:~# pvesh get /nodes/p720/hardware/pci --pci-class-blacklist "" ┌──────────┬────────┬──────────────┬────────────┬────────┬───────────────────────────────────────────────────────────────────────── │ class │ device │ id │ iommugroup │ vendor │ device_name ╞══════════╪════════╪══════════════╪════════════╪════════╪═════════════════════════════════════════════════════════════════════════ │ 0x010601 │ 0x8c02 │ 0000:00:1f.2 │ -1 │ 0x8086 │ 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] ├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────────────────────── │ 0x020000 │ 0x153b │ 0000:00:19.0 │ -1 │ 0x8086 │ Ethernet Connection I217-V ├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────────────────────── │ 0x030000 │ 0x1184 │ 0000:02:00.0 │ -1 │ 0x10de │ GK104 [GeForce GTX 770] ├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────────────────────── │ 0x040300 │ 0x8c20 │ 0000:00:1b.0 │ -1 │ 0x8086 │ 8 Series/C220 Series Chipset High Definition Audio Controller ├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────────────────────── │ 0x040300 │ 0x0e0a │ 0000:02:00.1 │ -1 │ 0x10de │ GK104 HDMI Audio Controller ├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────────────────────── │ 0x060000 │ 0x0c00 │ 0000:00:00.0 │ -1 │ 0x8086 │ 4th Gen Core Processor DRAM Controller ├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────────────────────── │ 0x060100 │ 0x8c4c │ 0000:00:1f.0 │ -1 │ 0x8086 │ Q85 Express LPC Controller ├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────────────────────── │ 0x060400 │ 0x8c10 │ 0000:00:1c.0 │ -1 │ 0x8086 │ 8 Series/C220 Series Chipset Family PCI Express Root Port #1 ├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────────────────────── │ 0x060400 │ 0x8c18 │ 0000:00:1c.4 │ -1 │ 0x8086 │ 8 Series/C220 Series Chipset Family PCI Express Root Port #5 ├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────────────────────── │ 0x070002 │ 0x8c3d │ 0000:00:16.3 │ -1 │ 0x8086 │ 8 Series/C220 Series Chipset Family KT Controller ├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────────────────────── │ 0x078000 │ 0x8c3a │ 0000:00:16.0 │ -1 │ 0x8086 │ 8 Series/C220 Series Chipset Family MEI Controller #1 ├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────────────────────── │ 0x0c0320 │ 0x8c2d │ 0000:00:1a.0 │ -1 │ 0x8086 │ 8 Series/C220 Series Chipset Family USB EHCI #2 ├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────────────────────── │ 0x0c0320 │ 0x8c26 │ 0000:00:1d.0 │ -1 │ 0x8086 │ 8 Series/C220 Series Chipset Family USB EHCI #1 ├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────────────────────── │ 0x0c0330 │ 0x8c31 │ 0000:00:14.0 │ -1 │ 0x8086 │ 8 Series/C220 Series Chipset Family USB xHCI ├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────────────────────── │ 0x0c0500 │ 0x8c22 │ 0000:00:1f.3 │ -1 │ 0x8086 │ 8 Series/C220 Series Chipset Family SMBus Controller ├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────────────────────── │ 0x118000 │ 0x8c24 │ 0000:00:1f.6 │ -1 │ 0x8086 │ 8 Series Chipset Family Thermal Management Controller └──────────┴────────┴──────────────┴────────────┴────────┴───────────────────────────────────────────────────────────────────────── root@p720:~#
What does -1 in IMMU_group mean?

Here are some specific questions where I hope you can help:
  1. Proxmox Configuration: Are there specific steps or configuration settings I should be aware of to successfully pass the GPU to a virtual machine?
  2. Drivers and Compatibility: What about drivers? Are there specific drivers I need to install to ensure the GPU functions properly in the virtual environment? Are there any limitations regarding GPU models?
  3. Performance and Experiences: Do you have experiences with performance when using a GPU in a virtual machine under Proxmox? Are there best practices to achieve optimal performance?
  4. Recommended Resources: Are there any resources, tutorials, or guides you can recommend for delving deeper into this topic?
I appreciate any advice, experiences, or links you can share. If anyone has successfully passed a GPU to a VM in Proxmox, I would love to learn more about it.
Thank you in advance for your support!

Best regards,
Me, the nice guy from the internet :)
 
  • Is VT-d enabled in the bios/UEFI?
  • What is the output of?: cat /proc/cmdline