[TUTORIAL] PCI/GPU Passthrough on Proxmox VE 8 : Installation and configuration

Thanks, @leesteken your concise and accurate comments in this thread and other places throughout the forum including from years ago really helped me to pass through Radeon RX580 GPU to Ubuntu 24.04 LTS VM, Sunshine/Moonlight streaming (no onboard/integrated graphics on motherboard).
 
Hi everyone,

I created a script (python) to help set up GPU passthrough on my Proxmox VE 8 server. I am using an AMD CPU and an Nvidia 3050 GPU. Feel free to comment and contribute!

You can find the script https://github.com/pedroanisio/gpu-passthrough-setup
I am going to be interested what this pumps out for my PVE server. I have had nothing but trouble trying to get this to work. You might want to update your script for mediated GPUs also.
 
  • Like
Reactions: KrisFromFuture
I was wondering, could I pass through both my iGPU AMD Video device and a standalone Nvidia RTX 3050 to two (2) separate VM's? Is it just a matter of running through the process for both devices?
 
FYI using this guide for an Intel iGPU (HD 500) causes the target VM to crash the host when booting, which in turn corrupted my TrueNAS VM and degraded 3 HDDs attached to that VM. Now I get to start all over.
 
thank you for your advice.

as your advice i change the service command , service started now
root@pve1:~# systemctl status vreset.service
○ vreset.service - AMD GPU reset method to 'device_specific'
Loaded: loaded (/etc/systemd/system/vreset.service; enabled; preset: enabled)
Active: inactive (dead) since Mon 2023-10-02 23:01:04 EEST; 40s ago
Duration: 2ms
Process: 2234 ExecStart=/usr/bin/bash -c echo device_specific > /sys/bus/pci/devices/0000:07:00.0/reset_method (code=ex>
Main PID: 2234 (code=exited, status=0/SUCCESS)
CPU: 2ms

Oct 02 23:01:04 pve1 systemd[1]: Started vreset.service - AMD GPU reset method to 'device_specific'.
Oct 02 23:01:04 pve1 systemd[1]: vreset.service: Deactivated successfully.


but vendor_reset model still not laded and i think this is the main issue

root@pve1:~# dmesg | grep vendor_reset
[ 12.103764] vendor_reset: loading out-of-tree module taints kernel.
[ 12.103816] vendor_reset: module verification failed: signature and/or required key missing - tainting kernel
[ 12.146306] vendor_reset_hook: installed
Have you fixed this?
 
Another BIG thank you for posting this. I registered to this forum so I can learn more about Proxmox as we are starting to use it (moving away from vmware :)) and to thank you for posting the steps to implement GPU Passthrough with version 8.x.

I first implemented this on a custom desktop with 2x RTX 3090 GPUs. Created two VMs and got passthrough to work nicely. That was a test run.

Just this week I got it to work on a Dell PowerEdge 750xa with Dual Intel Xeons and 4x A10 GPUs. That was very interesting experience but interestingly enough I had to use legacy boot selecting Default (SeaBIOS) when creating a VM for NVIDIA driver to properly connect to GPU. The GPU was showing in the VM (lspci), but the moment I installed NVIDIA driver and rebooted the VM, I could see console getting filled with the following errors:

NVRM: This PCI I/O region assigned to your NVIDIA device is invalid:
NVRM: BAR0 is 0M @ 0x0 (PCI:0000:01:00.0)

They just kept going and going. I spent a lot of time trying all kinds of things and in the end I came across another post somewhere that talked about the same error message but in a different situation that was "fixed" by using legacy boot instead of UEFI. The first iteration with the RTX 3090 GPUs and a custom desktop worked with no problem with VMs using UEFI boot.

I did not have time to update BIOS on the server. It is about a year old. So, I do not know if this could be something that a newer BIOS would handle better. The Proxmox was installed with UEFI, no problem, but the VM's that required pass through for A10 GPUs had to be created using Legacy boot.

Would anyone have any idea what might be at play here? It would be very educational. I may find time to update BIOS at some point and try again. If I do it, I would post it here.

All the best, and thank you again for taking time to write this tutorial.
Bogdan
 
Anyone know how to switch a Debian VM from legacy bios to UEFI to complete this passthrough without reinstalling the VM?
under hardware BIOS
While you may switch the way VM would attempt to boot, successfully converting the way it actually boots would require more work. You may search more for it. Here is how it was suggested some time ago to go about it for ubuntu (make sure you also read the "EDIT" part of the top answer):

https://askubuntu.com/questions/913397/how-to-change-ubuntu-install-from-legacy-to-uefi\

I never tried it so I do not know if it would work. Bottom line, for UEFI boot, at the minimum, you may need EFI boot partition on your virtual drive that legacy bios boot would not create. A few more things may need to be done as well to get it all to work.

BTW, that question was rather old so I'm not sure if it is still relevant.
 
Last edited:
While you may switch the way VM would attempt to boot, successfully converting the way it actually boots would require more work. You may search more for it. Here is how it was suggested some time ago to go about it for ubuntu (make sure you also read the "EDIT" part of the top answer):

https://askubuntu.com/questions/913397/how-to-change-ubuntu-install-from-legacy-to-uefi\

I never tried it so I do not know if it would work. Bottom line, for UEFI boot, at the minimum, you may need EFI boot partition on your virtual drive that legacy bios boot would not create. A few more things may need to be done as well to get it all to work.

BTW, that question was rather old so I'm not sure if it is still relevant.
yeah did not think of that at that time as i was heading off to bed but no one else replied to the guy, me personally i hate when that happens.

but if someone else looks for this they can find it and your post will help that even further.

I am currently playing with SR-IOV funtime.
Thanks brother.
 
  • Like
Reactions: bkosanovic

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!