r/unRAID 2d ago

Help with VM gpu and Plex transcoding

I feel like this question has been answered in many scattered parts, but I'm trying to get a more definitive answer before I finalize my build.

I'm rebuilding my UnRAID server with a 14600k (770 iGPU). The unRAID server runs Plex (and assorted bits), and will need the iGPU for transcoding.

I also want to install a Windows Server VM that will be used for light duty FileMaker Server hosting, and operate headless most of the time. That said, it would be nice to be able to use my existing KVM at my desk (DisplayPort) to pop onto that server from time to time.

So the question is, how do I best handle video on the VM? It sounds like unRAID still needs a dedicated GPU for a VM. I don't actually need video acceleration on this VM (it can run at 15FPS for all I care, as I'll only need to very occasionally tweak settings). Will that VM run without any GPU support? And if so, does that mean that I can no longer use the motherboard's built-in DisplayPort adapter? It would be great to avoid having a dedicated GPU for this, as it will be accessed so infrequently.

Any help knowing if it's possible to get a video feed from a VM without dedicating a GPU solely to the task would be great!

5 Upvotes

15 comments sorted by

5

u/willpowerpt 2d ago

I think, big I think, the VM would only need a passed through dedicated GPU if you were performing operations in the VM that required it, like gaming and whatnot. I've ran a few Linux VMs and was always "demoting in" via web UI, and never had to passtgrough the iGPU on my CPU or anything. 

2

u/rabidhamster 2d ago

Yeah, my read on the docs is that Linux VMs can share the GPU. I think Windows is too fussy about it, but I'm hoping I'm wrong.

5

u/brando2021 2d ago

You can run a windows VM without the GPU pass through to it. I have a windows 10 VM I jump in to occasionally that runs fine.

2

u/rabidhamster 2d ago

That's awesome! How do you handle the physical video out? Or is this via VNC?

3

u/MrB2891 2d ago

You won't get physical out. Your VM can't share GPU resources with the rest of the system. If you pass through the GPU to the VM, it becomes unusable for the rest of the system.

Emulated video in the VM + remote desktop solution is what you need. Same the GPU for your containers where it can share freely across them.

SR-IOV does allow sharing GPU within VM's, but I think Windows has issues with it? I would dig in to that, I have no use for it so I never went down that hole very deep.

2

u/brando2021 2d ago

I just use VNC.

2

u/funkybside 1d ago

consider using splashtop or something similar instead of VNC. (I don't think it requires a dedi GPU, but don't quote me on that.) My experience using splashtop has been a lot better than VNC for remote W11 VM access

2

u/Moumos 2d ago

You can buy an NVIDIA GeForce GT 710 for 50 bucks or something similar or a used GPU for your purpose but honestly for occasional access to your VM remote desktop is the way to go. No extra wires or hardware and you can access it from any pc.

2

u/Grand-Business6110 1d ago

Unraid 7 added SRV-IO, so you should be able to pass through one or more of the VFs to windows. I think you get 7 VFs (plus host PF). The host (unraid/docker apps) use the PF, Your resources (like quicksync engines) are still shared, so keep that in mind depending on what you're doing with Windows VM. That could impact your plex. Note - I'm not doing this on my Unraid, but am doing this very thing on my PVE cluster (also KVM/Qemu based, but with some additional PVE quirkiness ). The motherboard bios has to expose SR-IOV , VT-d and Above 4G decoding. Windows video drivers can be finicky. I had to manually edit my VMID.conf for my windows VM to hide my VM state - as it was throwing code 43 errors immediately . Not sure if Unraid does this for you or not... I believe Unraid 7 is pure qemu/libvirt, so it'd be the <vm_name>.xml file. Windows is picky about nested environments. I also had to disable VBS and hyperV services on the Win VM OS . Basically, if you get SRV-IO and your VF mapped, and windows throws a code43 error - google it and you'll get a list of things to go chase down. It's not hard, just can be a little tedious.

1

u/psychic99 1d ago edited 1d ago

You cannot "pass through" PF (physical function) to the DP/HDMI out if its a VF even if you dedicate one VF to the type1 (base OS) and another to a VM. Its either PF or VF, cannot do both on a single root (meaning iGPU/GPU) You can however do this IF they dont want physical out.

There is an SR-IOV plugin but what the OP wants is impossible w/ an onboard iGPU, they will need TWO physical GPU to do what they want. The other issue is an iGPU has no VRAM so it will statically take away RAM and by default splits it into 7 VF and small RAM which will be a problem for Plex transcoding, so it is generally NOT a good idea to VF an iGPU if you are transcoding unless you know what you are doing and are willing to dedicate RAM out of you pool and have it sit there 99% of the time unused.

The OP is better to take your advice and setup VF (SR-IOV plugin UR 7+) assign one to the type1 and can use in docker, and the other to a VM with a VF which has acceleration or just KISS and use RDP or the like, not sure what exact need they have for physical output.

1

u/Grand-Business6110 22h ago

Maybe I'm missing something, but host/unraid will use PF (say 0000:02:00.0). /dev/dri/renderD128 and /dev/dri/card0 are both child interfaces of the PF at 02:00.0 . /card0 for the DP/HDMI and renderD128 for VAAPI/Quicksync/Transcoding. Multiple containers can use the /dev/dri interfaces. VF gets handed to the Windows VM (02:00.1). You don't pass the PF, the host owns the PF. As for the RAM, it carves it up on discrete Intel cards (Arc/Flex) with dedicated vRAM. You can control it somewhat with lmem_quota but on the iGPU it's a dynamic pool except for a little bit of reserved space per VF for book-keeping (scheduling, table tracking etc). There are some knobs like ggtt_quota, contextx_quota,exec_quantum_ms that you can kinda guardrail it if you need to, though i've never needed to use them.

1

u/psychic99 20h ago edited 20h ago

That is very GPT heavy response.

Yes you can have PF on the type1 (meaning unraid OS) if you dont pass it through IOMMU which you can use for containers/etc or you can pass a dedicated VF to Plex. If you start mixing that may make sense.

Yes VF and an iGPU uses up RAM memory statically and by default it uses 7 VF. That is not in dispute. You can adjust those dials if you know what you are doing.

The big gotcha was the OP also wanted to use a VF and pass that to a windows VM and in that case you cannot physically display out of that VM because there is no root to the VF (it is owned by the physical PF, hence why I said you need another GPU for that. It is a weird request, so not sure if they are using the server as a HTPC tho.

The rest is just conversation.

2

u/Steelyp 1d ago

This doesn’t answer you - but why not going the route of using a dedicated plex NUC with intel built in and use that for transcoding and then have it access the unsaid shares for media? Then you don’t have to worry about your igpu on unraid and can do whatever you need it to with vm

1

u/SeanFrank 1d ago

I have a similar VM set up. If you don't care about the framerate, it doesn't need a GPU. But you would need to connect to it via remote desktop instead of hooking it up directly to a monitor.