RESOLVED: Failed to connect to Spice Server after Config Change

Hey folks!

I was meddling with my LG passthrough setup (yes I know :eyes:) whilst trying to get it so I can optionally pass the faster guest GPU back to the host for native use, and I’ve somehow messed up my LG Windows guest. I have tried undoing everything I changed (mostly Nvidia X-server stuff and some PCI and ivshmem setup stuff) but I haven’t managed to recover back to the former good setup I had.

Right now the Guest VM starts up fine (I can use it the old fashioned way through directly connected monitor and keyboard/mouse). If I start up the LG client on the host it quits immediately with:

?  ~ looking-glass-client -F egl:vsync
  3647306875 [I]               main.c:1740 | main                           | Looking Glass (B2-27-g59011b7bcb)
  3647306892 [I]               main.c:1741 | main                           | Locking Method: Atomic
  3647458931 [I]            ivshmem.c:181  | ivshmemOpenDev                 | KVMFR Device     : /dev/shm/looking-glass
  3647512337 [E]               main.c:1328 | lg_run                         | Failed to connect to spice server
?  ~ 

if I add ‘-s ALL’ to the end of the client switches, the LG window comes up successfully but I don’t have any input from the host (obviously).

I have tried reinstalling the Spice guest drivers on the Windows VM, and reinstalling the virtio drivers, but so far no cigar.

Any advice on how to proceed here would be most welcome.

My setup:
Host Ubuntu 20.04
Ryzen 9 3900X, 32GB RAM
Host GPU GTX 1070
Guest GPU RTX 2070 Super
SSD Passed to guest as Windows system drive.

Did you remove the QXL virtual video device or set it’s type to none? Removing it removes spice support from the VM entirely.

Hey @gnif, thanks for your reply. The QXL device is still setup the same way as it was when I first got everything working well.

<video>
  <model type="none"/>
</video>

<graphics type="spice" autoport="yes">
  <listen type="address"/>
  <image compression="off"/>
</graphics>

It just occurred to me that I did boot directly into the VM once, and that may be the problem. I’ll see if I can force Windows to re-detect the VM hardware, or if I have a restore point from before the direct boot.

After testing out some more things, it does seem like the problem is with the host rather than the guest VM - I’ve drawn this conclusion as I have a second Windows VM, which is image based rather than a hard drive passthrough, so I haven’t native-booted it. This one also has the same issue as my gaming VM, LG client gives me ‘Failed to connect to spice server’.

I’m going to look back over the host setup and see if anything can be adjusted here to get it working again. Suggestions here would be welcomed.

UPDATE: Fixed it! Ashamed to say it was a schoolboy error. In my random messing around I had enabled a VNC server on the host which was listening on port 5900, blocking the Spice port. Stopped the VNC server and it’s working again!