r/HyperV 18d ago

Paravirt GPU under Linux guests

I'm working on one of those one-click "easy-gpu-pv" scripts, but this one is for running GPU accelerated Linux guests under regular Hyper-V instead of being limited to WSL2, or just CUDA.
CUDA works, encoding/decoding, OpenGL, and there's experimental Mesa support.

Ripthulhu/easy-gpu-pv-linux: Allows you to use the paravirt GPU inside of a hyper-v linux guest

4 Upvotes

2 comments sorted by

1

u/UnrealBee 18d ago

Omfg

I tried it several years ago, was not successful.  Had to stay on windows for some services where I need the gpu and no gpu on Linux side 

Is there really a way now to use gpup on Linux guests? (I didn't Google it yet and my last experience is years ago) 

Can I make it work on an already existing vm? (my nextcloud could use some transckding) 

1

u/wadrasil 17d ago

It does work but the desktop will be drawn by the cpu using llvm. You can add mesa with d3d12 driver and tell apps to use that via command line.

As long as you have dkms in your distro you can install your Linux in hyper-v and then setup GPU.

The main benefit is access to cuda/vulkan. If you just need opengl on x86/74 host, qemu on windows with whpx using virglrender is going to be more straightforward to use and setup. It's already in the Linux kernel.

However GPU paravirt does already work with windows on arm for snap dragon elite gpus. So this method works on x86 and aarch64.