Enable spice/qxl with video type none so that Looking Glass can use host spice server

mcanfield

New Member
Mar 2, 2021
2
0
1
The Proxmox documentation references Looking Glass, software that enables high performance and low-latency display mirroring between host and guest, as a use case for what Inter-VM shared memory (ivshmem) could be used for (see "Inter-VM shared memory" https://pve.proxmox.com/wiki/Qemu/KVM_Virtual_Machines )

Between the Proxmox and Looking Glass documentation many people (including myself) have gotten the display mirroring portion to work well from a Linux guest to Windows guest running on Proxmox. However, there appears to be no easily found documented cases in which individuals have gotten the Looking Glass built-in Spice client to work with the Proxmox host spice server.

Per the Looking Glass creator, "you cannot use Looking Glass alongside a QXL video device, you must set the type to 'none' and disable it, but not remove it." However, it's not obvious if this is possible for Proxmox QEMU guests since spice/qxl is removed from the vm when display is set to none (see https://pve.proxmox.com/wiki/SPICE and https://pve.proxmox.com/wiki/Qemu/KVM_Virtual_Machines#qm_display )

In libvirt you can configure VMs in the Looking Glass team's prescribed manner with:

XML:
<devices>
  <graphics type='spice'/>
  <video>
    <model type='none'/>
  </video>
</devices>

Is there a way for PVE QEMU args to support such a configuration so that the PVE host spice server is available to guest vms without needing to have the qxl display enabled?
 
I don't think this is possible with PVE out of the box. You can take a look at the actual command to start the VM by running qm showcmd <VMDI> --pretty and modify it if you feel up for the task.

Besides that, feel free to open an enhancement request in our bug tracker.
 
@aaron thanks for the response. I'll go ahead and take a look and also submit a feature enhancement based on that investigation.
 
did you get any further with this?
I managed to got it working.
1. change your windows vm display type to "none" in proxmox webgui.
2. pass below extra args to your vm conf file other than the usual looking-glass stuff
-spice 'port=[your desired spice listening port],addr=0.0.0.0,disable-ticketing'
3. launching looking glass client with -c [your proxmox host ip] -p [your desired spice listening port]

enjoy!
 
  • Like
Reactions: leesteken
I managed to got it working.
2. pass below extra args to your vm conf file other than the usual looking-glass stuff
So the usual stuff.. is it this ??
qm set VMID --args '-device ivshmem-plain,memdev=ivshmem,bus=pcie.0 -object memory-backend-file,id=ivshmem,share=on,mem-path=/dev/shm/looking-glass,size=32M'

thanks in advance
 
So the usual stuff.. is it this ??
qm set VMID --args '-device ivshmem-plain,memdev=ivshmem,bus=pcie.0 -object memory-backend-file,id=ivshmem,share=on,mem-path=/dev/shm/looking-glass,size=32M'

thanks in advance
-spice 'port=15900,addr=0.0.0.0,disable-ticketing=on' -device virtio-serial-pci -chardev spicevmc,id=vdagent,name=vdagent -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 -device virtio-mouse -device virtio-keyboard -device ivshmem-plain,memdev=ivshmem,bus=pcie.0 -object memory-backend-file,id=ivshmem,share=on,mem-path=/dev/shm/looking-glass,size=32M

Above is my working config. Change your shm device size according to your resolution.
 
-spice 'port=15900,addr=0.0.0.0,disable-ticketing=on' -device virtio-serial-pci -chardev spicevmc,id=vdagent,name=vdagent -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 -device virtio-mouse -device virtio-keyboard -device ivshmem-plain,memdev=ivshmem,bus=pcie.0 -object memory-backend-file,id=ivshmem,share=on,mem-path=/dev/shm/looking-glass,size=32M

Above is my working config. Change your shm device size according to your resolution.
what args do you pass to your client VM to share the same IVSHMEM to it?

what comand do you use to launch looking glass from your client VM?

thanks
 
Just got Looking Glass working Great on Proxmox between WIndow 10 LTSC and Ubuntu 21.10 and stuck all the info in the guide below:


# Looking-Glass-on-Proxmox
Guide on how to setup looking glass on proxmox


## Prerequisites

- A working Proxmox install on a computer with 2 GPU's (Tested with 7.1-6)
- A Windows VM with GPU passthrough working (Tested with Win 10)
- A Linux VM with GPU passthrough working (Tested With Ubuntu 21.10)
- Proxmox Host Installed and running on the Windows VM


## Windows VM setup

Using the Proxmox GUI, Set the Windows VM Display to "none"

Then in a shell to the Proxmox host edit the Windows VM Config:

`
nano /etc/pve/qemu-server/**YOUR-WINDOWS-VM-ID**.conf
`

And add the arguments to the `args:` line. If the `args:` line doesnt exist, create it at the top of the config.

`
-device ivshmem-plain,memdev=ivshmem,bus=pcie.0 -object memory-backend-file,id=ivshmem,share=on,mem-path=/dev/shm/looking-glass,size=32M -device virtio-mouse-pci -device virtio-keyboard-pci -spice 'addr=0.0.0.0,port=5930,disable-ticketing=on' -device virtio-serial-pci -chardev spicevmc,id=vdagent,name=vdagent -device virtserialport,chardev=vdagent,name=com.redhat.spice.0
`

The `-device virtio-mouse-pci -device virtio-keyboard-pci` are not strictly necessary but should reduce input latancy.

Boot the Windows VM

## Linux VM setup

In a shell to the Proxmox host edit the Linux VM Config:

`
nano /etc/pve/qemu-server/**YOUR-LINUX-VM-ID**.conf
`

And add the arguments to the `args:` line. If the `args:` line doesnt exist, create it at the top of the config.
`
-device ivshmem-plain,memdev=ivshmem,bus=pcie.0 -object memory-backend-file,id=ivshmem,share=on,mem-path=/dev/shm/looking-glass,size=32M
`
- Boot the Linux VM, and download the latest Looking-glass source from https://looking-glass.io/downloads (Tested with version B5.0.1)
- Follow the Official Looking-glass documentation on how to Build Looking-Glass Client - https://looking-glass.io/docs/B5.0.1/build/#building
- Follow the Official Looking-glass documentation on how to install the kernal modual - https://looking-glass.io/docs/B5.0.1/module/


## Running Looking-Glass

- Make sure both VMs are running.
- On the Linux VM, open a terminal and `cd` to the looking glass client build folder
- Run Looking-Glass with `./looking-glass-client -f /dev/kvmfr0 -c 192.168.10.98 -p 5930`
 
  • Like
Reactions: tristank
Can this be used with the onboard gpu as well ? As having 2 gpu in same windows.. it's for certain application, but still 2 gpu. i guess nvidia Grid might be best fit.
 
Using the above method, declare success! I came here specifically to congratulate you
 
我在debin系统中运行looking-glass-client已经成功了,然后我有个想法,我想再win10的别的主机上面也运行looking-glass-client,再官方文档中并没有找到对looking-glass-client这个二进制的编译,要是能将looking-glass-client再WIN10的同局域网运行就更好了!!!希望大佬能给个建议,是否支持这样做呢?因为我发现这个looking-glass-client是已IP+端口的方式运行起来的!!!
我想使用msys64对
Administrator@GHXI MINGW64 /d/looking-glass-B6/client/进行编译

英文翻译:
I have successfully run looking-glass client on the Debin system, and I have an idea. I want to run looking-glass client on other Win10 hosts as well. However, I cannot find a binary compilation of looking-glass client in the official documentation. It would be even better if I could run looking-glass client on the same LAN as Win10!!! I hope the boss can give me some advice. Do you support doing so? Because I found that this looking-glass client is running in IP+port mode!!!

I would like to use msys64 for
Administrator@GHXI Compile MINGW64/d/reading glass B6/client/
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!