Info on vm to vm looking-glass

  1. Can looking glass be used to capture frames from windows 10 vm and display them on another linux vm?

  2. What are the software components I need to do this?

  3. What extra steps are there compared to a normal vm guest to host looking glass setup?

    I have a working passthrough setup with on an Asus m5a97r2 mobo. The cpu is a fx8370. first vm has a gtx 1070 passed through. The other vm would use an amd xfx6570 passed through. The host uses a legacy pci slot with a gforce gt 610. The idea is to capture the gtx1070 windows vm screen and view it on the amd6570 linux vm. All linux installs use arch linux.

Yes

Looking Glass and the KVMFR Kernel module for your Linux VM in the Looknig Glass module directory.

For Windows, nothing different. For your Linux VM, just add a IVSHMEM device using the same shared memory and load the KVMFR kernel module. In the Linux guest VM instead of uisng /dev/shm/looking-glass as the shared memory file for the LG client, use /dev/uio0.

1 Like

Got it working:

On the Linux host:

 touch /dev/shm/looking-glass && chown qemu:qemu /dev/shm/looking-glass && chmod 660 /dev/shm/looking-glass 

Linux Guest VM:

  1. edit libvirt config:
<shmem name='looking-glass'>
  <model type='ivshmem-plain'/>
  <size unit='M'>128</size>
</shmem>
  1. compile & install the client
dnf install make cmake binutils-devel SDL2-devel SDL2_ttf-devel nettle-devel spice-protocol fontconfig-devel libX11-devel egl-wayland-devel wayland-devel mesa-libGLU-devel mesa-libGLES-devel mesa-libGL-devel mesa-libEGL-devel libXfixes-devel
git clone --recursive https://github.com/gnif/LookingGlass.git
cd LookingGlass/
git checkout B1  -f
mkdir client/build
cd client/build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ../
make
ln -s $(pwd)/looking-glass-client /usr/local/bin/
  1. compile the kernel module
 dnf install kernel-devel -y
 cd module
 dkms install .
  1. load the needed kernel modules
 modprobe uio
 modprobe kvmfr

Windows Guest VM:

  1. edit the libvirt config
<shmem name='looking-glass'>
  <model type='ivshmem-plain'/>
  <size unit='M'>128</size>
</shmem>
  1. install virtio driver
  2. install and start the host process

Using the following command line i got it working:

 looking-glass-client -f /dev/uio0 -L 128 -s
1 Like