Looking glass in a VM as a HOST and client as a VM as well

So looking glass usually works by having windows VM and passing it’s graphics to the host.
Is it possible to have a looking glass host on a VM and accessing it from another VM?

Moved to the Looking Glass category.

It is definitely possible, last I heard that is how gnif is primarily using Looking Glass.

The additional piece you need is the kernel module:

1 Like

You also get a performance boost with the current bleeding-edge version as DMA transfer from shared RAM to the GPU is possible with VM to VM configurations.

1 Like

Is there a FAQ for VM > VM mode?

I kind of struggle to grasp the concept here.

I have a
VM1(Fedora) - RX6800 passed through and this what drives my displays
VM2(Windows10) - 2080TI passed through and this is what I want to bring up in VM1
Host(Buster/Proxmox)

I’m assuming the https://github.com/gnif/LookingGlass/blob/master/module/README.md goes on a HOST.
Then what’s the rest of the work here? How do I expose the LookingGlass back to Host and then pass it back to VM1 ?

I haven’t tried this but it seems to me that all you need to do, is pass IVSHMEM device from host machine to fedora VM1.

So I suppose just adding:

    <shmem name="looking-glass">
      <model type="ivshmem-plain"/>
      <size unit="M">32</size>
    </shmem>

To VM1 xml should be enough?

Assuming of course, that you already configured your windows VM2 beforehand, just like LG docs say.

Edit: Main point is, you need to read data from IVSHMEM in your VM1 instead writing to it, so maybe there is some flag for device XML for read only mode. Or maybe its bidirectional, then you dont have to do anything else.

Ok, I’ve ran out of the ideas here.

I am unable to bring up the /dev/uio0 device on either host(buster) or the VM1 (Fedora)

Ok so, installed another VM and compiling from Release/B2 brings up the /dev/uio0 so this must be something wrong with the bleeding edge from master.

Issue is … I need to be on minimum 5.10 kernel to get the amdgpu drivers work.
I’ve managed to compile the Release/B2 by applying this 5.10 69b8c4b4eb9d36459062cdaaaf88f32366fc3ef0 patch but still it does not bring up the uio device.

Bleeding edge does not use /dev/uio0 anymore, it’s now /dev/kvmfr0