Viewing Spice-enabled VMs from Windows - might work with VNC, too?

Hey,

I just figured out what is probably the easiest way to view VMs with Spice protocol enabled from Windows.

I figured that might be helpful to people on this board since there’s lots of people using KVM but spending time on Windows desktops.

I pretty much always use Windows (I like Linux, but I get more done in Windows myself) so I am really happy to have this capability to view my KVM VMs when I need to and not be limited just to SSH (I guess there’s always VNC but this is easier and KVM defaults to Spice protocol, so…)

Anyway, here’s what to do:

Head on over to https://virt-manager.org/download/ and download either 32 or 64-bit virt-viewer MSI installer for Windows (doesn’t matter which if you have 64-bit Windows - if you’re on 32-bit, get 32-bit because 64-bit won’t work…)

https://www.spice-space.org/download.html is also a good resource for all things Spice…

Install the Virt-Viewer MSI - if SmartScreen throws an “unknown vendor” error just ignore it and install anyway. If you’re paranoid, there’s a GPG key on the virt-viewer web page you can use to scan the MSI.

Then go to C:\Program Files (x86)\VirtViewer v5.0-256\bin (32-bit version) or C:\Program FilesVirtViewer v5.0-256\bin (64-bit version) and look for the executable named remote-viewer.exe

Double click on remote-viewer.exe and it’ll bring up a window. In the top bar, type the IP or FQDN and port of your Spice VM address-bar style and hit enter, like so: spice://192.168.1.200:5900 or spice://kvm.vm.localdomain:5900

That should be it, you should see the GUI of your VM now. If you have any problems, try adding a rule in Windows Firewall for remote-viewer.exe - if that doesn’t work, try the opening the port you’re using. For convenience, I pinned the icon to my taskbar since I know I’ll be using it a lot and don’t want to have to navigate to the folder every time.

There’s a ton of other apps inside the bin folder, too. I am trying to figure out how to connect using Virsh next - not that I am an expert or anything, but it’s pretty cool that it’s an option…

Oh, last thing - mostly unrelated - if you install Git in Windows it installs a full-featured Bash TTY that’s great for SSH, Nano/vim/emacs/[insert your favorite text editor], SCP, generating keys, etc. all from inside Windows pretty much just like you’re in Linux - you can even edit the ~/.bashrc and /etc/profile to your heart’s content. It’s not as heavy (or full-featured) as installing an entire compatibility layer like Cygwin so it’s a nice option for people that primarily use *Nix machines remotely and just need the interface.

Questions? Ask! Hope that helps someone!

Oh, and if you figure out how to connect Virsh, tell me how!

Edit: I searched the program’s root and noticed there’s also libgtk-vnc-2.0-0.dll and libvnc-1.0-0.dll libraries, it might also work with VNC by replacing the spice:// with vnc:// in the address bar. I don’t have any VNC VMs ATM so I haven’t tested it, would someone try it out and report back?

note: spice triggers some anticheat programs

if you need to remote VNC and services like teamviewer do not do this

I did not know that, thanks! … wait, what’s an anticheat program? Sorry, I’m not a gamer…

a detection framework that bans people from online games for certain behaviors heuristically.

The reason people use looking glass instead of built in VM displays is to avoid them, as well as get lower latency and better image quality (which, if you’re accessing your VM from the machine it’s running on, are clear benefits)

Oh interesting, never heard of looking glass. Even VNC will trip the anti-cheat analysis? What about RDP?

haven’t tested it thoroughly but the rule of thumb is that if it sends input over the network then it’s under the same purview as spice

Ahh, gotcha!