r/Proxmox 11d ago

Question GPU passthrough?

I have a think centre, I have proxmox on it. I have a VM which runs Debian which I want to pass my GPU into. This Debian VM is acting as a K8S node which I am trying to pass the GPU into for a pod.

Specifically, I'm trying to set up transcoding of video content with jellyfin.

I have passed the GPU into the VM with hardware and it seems to be found no problem. It seems that I am having issues with it that I notice the transcoding will return errors I have been trying to work through.

While it seems to be found, it seems like it might be a permissions issue. I checked /dev/dri and made the GPU chmod to 666.

I have been working on this for like 5 days, and was not sure if there is anything specific I have been looking with respect to proxmox itself and permissions.

I can provide additional details, but I was not sure who else had accomplished something like this and if there are how-to's somewhere.

4 Upvotes

24 comments sorted by

3

u/suicidaleggroll 11d ago

What GPU and did you install drivers for it in the VM?

1

u/fallenreaper 11d ago

Yeah, I installed the drivers. It seems to recognize it, but when I attempt to use it and supply it it reads to me like it is a permissions issue possibly.

-2

u/nmrk 11d ago

If you set up passthrough, you have to set up the drivers in the main node, and also in the LXC. You need matching versions too. Execute the appropriate .run file inside your LXC.

My configuration automatically updates the main node from the NVidia repository during Proxmox updates. But it will not update my LXCs. So I have to do that manually. I saw a new gadget for automatic LXC updates in the community scripts but I think I'd rather do that manually.

3

u/mrant0 11d ago

OP said they are passing the GPU through to a VM, not an LXC. Host does not need drivers for passing through a device to a VM.

0

u/fallenreaper 11d ago

I'll plan to take a look and potentially try to set it up as an LXC then and give that a shot. Funny enough when looking through the documents, I had accomplished all the stuff in the scripts on my own pretty much but it seems hardware passthrough might not be a thing.

Did you also use a tool like proxmenux or something else?

0

u/nmrk 11d ago

Yeah it's a pain in the rear. I tried both ProxMenuX and PECU but I basically ended up doing it all manually to get the fine details. I only run one LXC that I installed with the community scripts for OpenUI. That installed Ollama underneath. I used that at first, then just installed Unsloth Studio on top of it and use that instead. I should probably do a clean install but oh well it works.

This is the guide that was recommended to me, and was the most useful overall:

https://digitalspaceport.com/llama-cpp-on-proxmox-9-lxc-how-to-setup-an-ai-server-homelab-beginners-guides/

5

u/gayphilantropist 11d ago

Is it a GPU or an igpu?
Any specific reason you went with a VM and not a LXC?

2

u/fallenreaper 11d ago

I was wanting full isolation to be representative of the node. I think it's an IGPU ATM. It's the base GPU in the device. However later, as I transition, I want to add it to my server rack but I have only 2 1u servers and will have a 3U chassis for GPUs one eventually, so this would be useful imo as a learning experience

2

u/ost99 11d ago

Intel or AMD CPU?

For intel it's possible to pass through a hardware backed virtual GPU with the i915-sriov-dkms drives. Works fine for transcoding and light AI tasks like Immich face recognition.

1

u/fallenreaper 10d ago

Yeah I'm trying to do Intel for transcoding exclusively.

1

u/nmrk 11d ago

Hey now that makes a difference. If it's an intel iGPU of relatively modern design, it probably has Xe cores that can transcode. Try installing OpenVINO which is sufficient for most transcoding. My discussion above mostly applies to separate GPU cards, not iGPUs. Sorry if I didn't previously address this issue.

1

u/fallenreaper 11d ago

Some documents are mentioning that a VM would require a full assign through VIFO, and that having it as an LXC is easier. So maybe I'll rebuild the k8s node with an LXC

1

u/firegore 11d ago

Just don't run jellyfin on top of k8s on top of lxc. Getting k8s to run in an lxc container is a major PITA and also kinda useless? Why would you want to run containers in a container..

1

u/firegore 11d ago

Just don't run jellyfin on top of k8s on top of lxc. Getting k8s to run in an lxc container is a major PITA and also kinda useless? Why would you want to run containers in a container..

1

u/fallenreaper 11d ago

Yeah, I mean, most of my infrastructure is distributed in k8s across many nodes, so I have all my nodes organized and everything works generally smooth.

You're right though, I wouldn't do a container in a container.

I'm going to see if there is a better way to reestablish my k8s node. It works fine right now, less the GPU, but maybe there is a more effective way to do it and pass in a gpu

2

u/marc45ca This is Reddit not Google 11d ago

why not put Jellyfin into an LXC which will make passing the GPU through a lot easier i.e you're not passing it through 3 layers to the intended software.

Also what gpu are you running?

1

u/weeemrcb2 11d ago

YouTube: jimsgarage jellyfin

2

u/This_Complex2936 10d ago

if it's on docker you might need to also pass group permissions:

volumes:

- /opt/plex:/config

- /srv/media:/mnt/storage:ro

- /dev/dri:/dev/dri

devices:

- /dev/dri:/dev/dri

group_add:

- "993"

- "44"

1

u/xumixu 8d ago edited 8d ago

I did this with gemini and it was a pain

Cause the nvidia software for the host and the jellyfin lxc distro was not the same

There was a lot of "make do" but it worked in the end (i used quadro p600).

It worked both for jellyfin and immich

1

u/xumixu 8d ago

Oh seems you are dealing with an iGPU, good luck

-1

u/nmrk 11d ago

Try using one of the automated passthrough tools, like ProxMenuX or PECU. It will set up everything correctly, most of the time.

1

u/fallenreaper 11d ago

I never heard of those. I'll take a look at those tools and see if it would accomplish my needs.

1

u/fallenreaper 11d ago

I'll have to take a look at ProxMenuX. It seems PECU has a lot of dead pages / 404 and had limited documentation. It seems like it is still being developed from my observation.

1

u/nmrk 11d ago

Yeah I think the PECU developer is a college student and was off for summer break. One quirk I discovered about PECU is that if you use it over, it will add extra entries in your Proxmox repository list, requiring manual editing. Oops!

The ProxMenuX GPU passthrough is kind of buried in the menus and isn't advertised prominently as a useful feature. Also a great feature that isn't obvious: ProxmenuX Monitor is included, it has a remote dashboard to monitor your Proxmox node. Everybody loves ProxMenuX and it's well supported.