Jump to content

Hardware Transcoding inside Hyper-V-VM


Recommended Posts

Posted

Is it possible to use hardware encoding on a Windows 11 VM inside a Hyper V VM (best would be using Docker inside that VM). I have a Intel HD Graphics card. Does it depend on that? Is it possible to see if hardware encoding is used? I used Emby a few years ago and as I remember, it was not possible.

Posted

Hi, I'm sure it's possible but you may have to spend some time configuring to make sure that both the vm and the docker container have access to the Gpu.  @softworkzmay have some tips.

Posted (edited)
4 hours ago, Luke said:

Hi, I'm sure it's possible but you may have to spend some time configuring to make sure that both the vm and the docker container have access to the Gpu.  @softworkzmay have some tips.

My last state of knowledge (from about a year ago) is that this isn't possible. Hyper-V offers GPU virtualization only on Windows Server, but even there it's not possible to use it with Intel GPU hw acceleration afaik. Chances might be better with Nvidia GPUs, but even there I doubt that it would be working with MS Hyper-V GPU virtualization because that is a thing of its own, not even intended for accessing GPUs from inside a VM in the same way as normally.
With Nvidia, it should work with PCI pass-through, but then you can't use the GPU outside of the container as a graphics card on the host IIRC. Probably the same applies to Intel discrete GPU cards, but not to iGPUs.
With VMWare, these things are working better, but only with the server product line, not with VMWare player.

I THINK that this is still valid, but I'm not totally sure.

What I don't know at all is whether a Windows-Docker container (so, no Hyper-V VM) might be able to access the GPUs. This seems more likely from a technical point of view, but that's pure speculation.

Finally, there's one thing that is working and which I had tried myself: When you have set up WSL2 on Win 11 with UI integration (= where you can run Linux apps which are shown as Windows-windows on the desktop), you can install Emby Server Linux on a WSL2 instance, and that Emby instance will then be able to use an Nvidia GPU for hw acceleration.
That doesn't work with Intel GPUs - at least last time I checked. I also had asked an Intel developer some time ago and there were no plans to support this at that time and their focus was rather on making AI compute functionality accessible from WSL2.

BTW, I'm not even sure whether it's possible at all to make an iGPU accessible from inside a real VM because iGPUs use shared memory (in various degrees - it's not just simply a full fixed contiguous block of memory like one might assume). At least all the virtualizations I'm aware of, where Emby is running (and using Intel iGPU HWA) are container-based virtualizations only.

Edited by softworkz
  • 2 months later...
Posted
31 minutes ago, pir8radio said:

https://www.techtarget.com/searchvirtualdesktop/tip/Running-GPU-passthrough-for-a-virtual-desktop-with-Hyper-V

sounds like first option in this link no longer works, but second one GPU Passthrough does now work.  I have yet to try it, but getting close..    

The first on never worked for HW video acceleration. It was made just for very specific use cases.

And I had already mentioned the second option above:

On 11/13/2022 at 8:54 AM, softworkz said:

With Nvidia, it should work with PCI pass-through, but then you can't use the GPU outside of the container as a graphics card on the host IIRC. Probably the same applies to Intel discrete GPU cards, but not to iGPUs.

pir8radio
Posted (edited)
11 hours ago, softworkz said:

The first on never worked for HW video acceleration. It was made just for very specific use cases.

And I had already mentioned the second option above:

Have you had first hand experience setting up passthrough and have any feedback as to its performance within a VM?   I get its passthrough, and "should" work the same, but with my testing vm's generally have lower performance than their bare metal equivalents, so i'm looking for some first hand feedback if possible. 

Edited by pir8radio

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...