GPU with srv-io and GUI access

,

Has anybody managed to get a guest VM, windows or linux, with SRV-IO GPU, and load it with Looking Glass?

I’d like to experiment in creating per HOST, 7 small virtual machines, that would use each one of the seven vgpus of Intel XE GPUs.

Until now, doing GPU passthrough was very easy, but I’m confused on what to edit and what to disable for qemu to get this done.

What does the GPU section of incus info --show-resources look like on your system?

GPUs:
  Card 0:
    NUMA node: 0
    Vendor: Intel Corporation (8086)
    Product: AlderLake-S GT1 (4680)
    PCI address: 0000:00:02.0
    Driver: i915 (6.11.3-arch1-1)
    DRM:
      ID: 1
      Card: card1 (226:1)
      Control: controlD65 (226:1)
      Render: renderD128 (226:128)
    SR-IOV information:
      Current number of VFs: 0
      Maximum number of VFs: 7
  Card 1:
    NUMA node: 0
    Vendor: NVIDIA Corporation (10de)
    Product: GA107 [GeForce RTX 3050 6GB] (2584)
    PCI address: 0000:01:00.0
    Driver: vfio-pci (6.11.3-arch1-1)

I am asking as to assign a VFs to a VM, it is ok.
The question is next how to use it, to have the display using that virtualized GPU and not the default common one, that gets setup when not using VFs.

I’m trying to figure out how to use it to have accelerated desktop, and not just a GPU available for other tasks.

Where I’m now trying to figure out next steps: Installation — Looking Glass B6 documentation

It really depends on the GPU and what they expose for their VFs.

On AMD server grade GPUs, each VF allows for rendering, so you’d go into the OS, set up something like sunshine/moonlight to share your display and also perform video encoding on the same GPU, then you’d hit the monitor configuration and turn off the built-in virtio-gpu.

But then some of the NVIDIA GPUs for example do not do any rendering, so you see them in the guest but you can only use them for accelerated video encoding/decoding and compute tasks.

I’m looking in how to get the Intel VFs. Is there any other solution besides Looking Glass that you’d be able to share a link for documentation?

I’ve not played with looking glass before, but setups where the VM is running on the same machine as the client, it looks like it could be a good solution.

In my case, I’ve been running those kind of VMs remotely so instead used sunshine and moonlight to get low-latency remote access.