GPU Windows Guest Sharing on Linux Desktop

I’m pretty sure I know the obvious answer here, but I’m hoping that there are some cool hacks someone has tried and and gotten working that go beyond that.

I am making a go of using Linux (Nobara at the moment) as my primary desktop and a lot of things are working great, but I still have a few Windows-only desired apps, and some of those want (specifically) an Nvidia GPU.

Is there any way to share any access to my primary graphics card (4070 ti super on AM5) with a queening/kvm Windows VM? It seems like this is not impossible with the datacenter models…any way to get it working with a consumer card? I assume there is no standards-compliant SR-IOV path.

Anybody come up with a cool hack?

Deleted. Answer to the wrong thread.

Virtio-gpu?

Can the linux host just do software rendering so you can just pass the nvidia card to the vm?

I’m guessing that would degrade my Steam games in
Proton, let alone the other Linux-based GPU tasks I wanted to be running in Linux.

Ideally just have another gpu. But yeah, sharing a single gpu would degrade it when the vm and host are both doing stuff.

I was being a bit tongue in cheek…obviously sharing resources would degrad perf. But what I was getting at was that using virtio-gpu would (unless I misunderstand, mean the host desktop and applications would not have any access to native GPU syscalls, so I wouldn’t be able to game or render or whatever in the host. If I need a whole separate GPU for the VM, I might as well just have a whole separate desktop for running Windows and just RDP into it.

If it’s up for consideration, you could also just use yet another Linux VM for Proton games and pass through the GPU to it.

i.e. primary desktop on integrated graphics, and whenever you want to use a discrete GPU boot up either the Linux or Windows VM depending on what you want.

Anyway there are a lot of us using multiple GPUs in our system in order to have a dedicated GPU for both Linux and Windows. I was in that boat for years (up until my needs were mostly met with Proton).

VirGL would hopefully be another option but it looks like it still isn’t for Windows (Draft: virgl/win: Virtio GPU 3D acceleration for windows (!24223) · Merge requests · Mesa / mesa · GitLab).

2 Likes

That is an interesting option. I should take a swing at creating a boot of that and seeing what the tradeoffs are.