SPICE Support + Config


Recommended Posts

15 hours ago, SimonF said:

One weird issue with Win11 persists, (not related)

The Spice service(s) don't start even when set to auto. Any ideas on how to do this? Win10 seems fine and Win11 works once you start them. (copy paste) Strange...

It starts automatically for me. But I only have the VDAgent, not sure what Spice agent is.

Link to comment
  • 2 months later...
3 hours ago, Econaut said:

How do you get unraid to launch to the virt-viewer (Remote Viewer) app directly instead of the buggy web interface?

Copy-paste still doesn't work in web or virt-viewer... Seamless integration on Proxmox.

Which vers are you running copy paste is availa le in 6.12 Will look to see if we can add starting remote viewer

Link to comment
8 hours ago, Econaut said:

Latest stable - 6.11.5 I think

Assuming Windows....Make sure Spice agent in services is set to auto and running.  You should also have these bits in your XML, around TPM section normally.  (Replace port with whatever you use...)

 

    <graphics type='spice' port='5905' autoport='no' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
      <mouse mode='server'/>
    </graphics>

 

 

    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0' state='connected'/>
      <alias name='channel1'/>
      <address type='virtio-serial' controller='0' bus='0' port='2'/>
    </channel>

Edited by dja
Link to comment
2 hours ago, dja said:

Assuming Windows....Make sure Spice agent in services is set to auto and running.  You should also have these bits in your XML, around TPM section normally.  (Replace port with whatever you use...)

 

    <graphics type='spice' port='5905' autoport='no' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
      <mouse mode='server'/>
    </graphics>

 

 

    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0' state='connected'/>
      <alias name='channel1'/>
      <address type='virtio-serial' controller='0' bus='0' port='2'/>
    </channel>

As a side note I have found you can create .vv files, double click on the file will start the session. Example details of the file contents below. I will look to see if I can get this to work from the host. But its also remembers them in the previous sessions. Support VNC for type also.

 

[virt-viewer]
type=spice
host=192.168.1.225
port=5902
 

image.png

  • Like 1
Link to comment
7 hours ago, SimonF said:

As a side note I have found you can create .vv files, double click on the file will start the session. Example details of the file contents below. I will look to see if I can get this to work from the host. But its also remembers them in the previous sessions. Support VNC for type also.

 

[virt-viewer]
type=spice
host=192.168.1.225
port=5902

Wow, that's huge...!!! I didn't think the recent connections thing even worked! This is a TON easier than the .bat / multiple shortcuts solution I've been using!  THANKS!!!

  • Like 1
Link to comment
On 4/21/2023 at 7:47 PM, SimonF said:

Added support via PR1307(subject to being merged) to start remote viewer from the unraid console. Support both VNC and SPICE

 

image.png 

This is in 6.12rc4 you can specify which options are shown in vm settings web remote-viewer or both

 

image.png

 

You need to set browser to always open the file type .vv after first download

image.png

  • Thanks 1
Link to comment

@SimonF thanks for the continued work on this! 

 

Question on the .vv files....what option would I add to specify the resolution or at least to disable auto-resize? I have a 4K monitor with a 1080p host I don't want to resize and I have to clear the option from the viewer each time I launch it. 

image.png.a8cf09f2de1c78a7c7a4df73ede02ffa.png

Edited by dja
Link to comment
3 hours ago, dja said:

@SimonF thanks for the continued work on this! 

 

Question on the .vv files....what option would I add to specify the resolution or at least to disable auto-resize? I have a 4K monitor with a 1080p host I don't want to resize and I have to clear the option from the viewer each time I launch it. 

image.png.a8cf09f2de1c78a7c7a4df73ede02ffa.png

[virt-viewer]
type=spice
host=
port=5905
proxy=http://
password=
tls-port=5906
fullscreen=1
title=wxp-apt-53011:%d - Press SHIFT+F12 to Release Cursor
enable-smartcard=0
enable-usb-autoshare=1
delete-this-file=1
usb-filter=-1,60186,10000,256,1|-1,1118,245,-1,1|-1,1133,2245,-1,1|-1,1133,2242,5,1|8,-1,-1,-1,1|7,-1,-1,-1,1|-1,-1,-1,-1,0
tls-ciphers=DEFAULT
host-subject=O=rhev.lab.eng.brq.redhat.com,CN=10.34.63.223
ca=-----BEGIN CERTIFICATE------
----END CERTIFICATE-----\n
toggle-fullscreen=shift+f11
release-cursor=shift+f12
secure-attention=ctrl+alt+end
secure-channels=main;inputs;cursor;playback;record;display;usbredir;smartcard

These are some of the options I have found so far.

 

so I think auto resize may be auto-resize=never or =always based on the cmdline option.

  • Like 1
Link to comment
On 5/5/2023 at 2:55 AM, SimonF said:

These are some of the options I have found so far.

 

so I think auto resize may be auto-resize=never or =always based on the cmdline option.


Thanks for the suggestions. I tried every combination I could think of without luck. I looked at some of the code they have up and I can't seem to find any reference to which flags can be used. 

 

I wish they had more documentation on Github. Maybe I'm looking in the wrong spot? 

https://github.com/jactry/virt-viewer

 

Link to comment
14 minutes ago, dja said:


Thanks for the suggestions. I tried every combination I could think of without luck. I looked at some of the code they have up and I can't seem to find any reference to which flags can be used. 

 

I wish they had more documentation on Github. Maybe I'm looking in the wrong spot? 

https://github.com/jactry/virt-viewer

 

 

 

Just found this. https://manpages.debian.org/testing/virt-viewer/remote-viewer.1.en.html

 

CONNECTION FILE
remote-viewer connection file is of INI file format, with a mandatory [virt-viewer] group and "type" key.

Example
Opening a file with the following content will start remote-viewer in fullscreen and connect to the host "betsiboka" using the SPICE protocol:

 [virt-viewer]
 type=spice
 host=betsiboka
 port=5900
 fullscreen=1
Key list
"version" (string)
If remote-viewer version number isn't greater or equal to the required version, an error is raised with the expected version.
The version format accepted is a list of integers separated by '.'. It can be followed by a dash '-' and an additional build number with the same format.

Version comparison is done by comparing each integer from the list one by one. If any of the component is not a number, the version comparison will fail and consider that the 2 versions are considered to be the same.

"versions" (osid:version list)
This is a list of osid:version couples separated by ';'. osid is an arbitrary string, version is a version number in the same format as in the 'version' field. A given couple indicates that remote-viewer builds matching the given 'osid' (fedora22, debian7, ...) must be at least version 'version'. For consistency, it's recommended to use libosinfo OS shortids as the osid.
"newer-version-url" (string)
If specified, this field is an URL which will be displayed to the user when a version check fails.
"type" (string, mandatory)
The session type, either "spice", "vnc" or "ovirt".
"unix-path" (string)
The server to connect to, using a Unix socket path. (supported with spice, since 8.0)
This option is incompatible with "host", "port" and "tls-port".

"host" (string)
The server host to connect to.
"port" (integer)
The server port to connect to.
"tls-port" (integer)
The server TLS/SSL port to connect to.
"username" (string)
The username for the session authentication.
"password" (string)
The password for the session authentication.
"disable-channels" (string list)
The list of session channels to disable.
The current SPICE channels are: main, display, inputs, cursor, playback, record, smartcard, usbredir.

"tls-ciphers" (string)
Set the cipher list to use for the secure connection, in textual OpenSSL cipher list format. (see ciphers(1))
"title" (string)
String to present in the window title.
"fullscreen" (boolean)
Opens the client windows in fullscreen.
"ca" (string)
CA certificate in PEM format (using "\n" to separate the lines). This will be used to verify the SSL certificate used for SPICE TLS sessions.
"host-subject" (string)
Verify the certificate subject matches with the given subject.
"toggle-fullscreen" (hotkey string)
Key binding for entering and leaving fullscreen mode. (see HOTKEY for description of expected string)
"release-cursor" (hotkey string)
Key binding for releasing cursor grab. (see HOTKEY for description of expected string)
"zoom-in" (hotkey string)
Key binding for zooming in and enlarging client window size. (see HOTKEY for description of expected string)
"zoom-out" (hotkey string)
Key binding for zooming out and reducing client window size. (see HOTKEY for description of expected string)
"zoom-reset" (hotkey string)
Key binding for reseting zoom and client window size. (see HOTKEY for description of expected string)
"smartcard-insert" (hotkey string)
Key binding for inserting emulated smartcard. (see HOTKEY for description of expected string)
"smartcard-remove" (hotkey string)
Key binding for removing emulated smartcard. (see HOTKEY for description of expected string)
"color-depth" (integer)
Set the color depth of the guest display (16 or 32).
"disable-effects" (string list)
A list of desktop effects to disable in the remote guest.
The effects that can be disabled with SPICE are: wallpaper, font-smooth, animation or all.

"enable-smartcard" (boolean)
Set to 1 to enable client smartcard redirection.
"enable-usbredir" (boolean)
Set to 1 to enable client USB device redirection.
"enable-usb-autoshare" (boolean)
Set to 1 to enable client USB devices auto-sharing.
"usb-filter" (string)
Set a string specifying a filter to use to determine which USB devices to autoconnect when plugged in, a filter consists of one or more rules. Where each rule has the form of:
"class,vendor,product,version,allow"

Use -1 for class/vendor/product/version to accept any value.

And the rules themselves are concatenated like this:

"rule1|rule2|rule3"

"secure-channels" (string list)
The list of session channels to secure.
The current SPICE channels are: main, display, inputs, cursor, playback, record, smartcard, usbredir.

"delete-this-file" (boolean)
Set to 1 for the client to remove this connection file (if it can't, it will fail silently)
"proxy" (string)
A proxy URL to tunnel the connection through.
At the time of writing this documentation, the only supported proxy method with Spice is HTTP CONNECT.

For example, to tunnel connection through foobar host HTTP proxy on port 8080, use the value "http://foobar:8080".

oVirt Support

 

Link to comment
  • 2 weeks later...
21 minutes ago, dja said:

 

What exactly is the syntax that would be in the ini (.vv) file? I tried --auto-resize and it doesn't want to load. 

If it is supported.

 

[virt-viewer]

type=spice

host=betsiboka

port=5900

fullscreen=1

auto-resize=auto or auto-resize=never if supported but I would need to look at source code.

Link to comment
8 hours ago, SimonF said:

If it is supported.

auto-resize=auto or auto-resize=never if supported but I would need to look at source code.

Bummer...I did try that. Looks like it is not. Is that something you can add? What would that cost me!? :)

 

I'm looking to start the session at 1920x1080 without resize, but full-screen by default. (no auto resize) I'm setting this up for a jump server for remote support and that is the standard resolution for the support folks I have who are using it. 

Link to comment
On 5/20/2023 at 3:37 AM, dja said:

Bummer...I did try that. Looks like it is not. Is that something you can add? What would that cost me!? :)

 

I'm looking to start the session at 1920x1080 without resize, but full-screen by default. (no auto resize) I'm setting this up for a jump server for remote support and that is the standard resolution for the support folks I have who are using it. 

I have requested a feature request to add to .vv file as not sure where to add and create a merge request.

  • Thanks 1
Link to comment
  • 2 months later...
On 4/27/2023 at 3:26 PM, SimonF said:

This is in 6.12rc4 you can specify which options are shown in vm settings web remote-viewer or both

 

image.png

 

You need to set browser to always open the file type .vv after first download

image.png


I'm on 6.12.3 but cannot see this option to launch remote-viewer - where are they located?

Edited by Econaut
Link to comment
  • 2 months later...

*I SOLVED IT!!**.. i had to setup virt-manager from my mac, then add the two extra QXL video cards that way.  i will. add what those looked like via xml at the bottom of the post.

 

then i ad to use remote-viewer and check each of the three monitors, that is the third icon from the left that looks like a monitor and then check Display 2, and 3 (obviously 1 is already checked.

--------------------------------------------------------

 

is it possible to start a spice viewer session and have it work fullscreen on three monitors? like how RDP can on windows 10/11 for example.

do i just increase heads=1 to 2 or do i need to duplicate the following part of the xml and sort of bump up parts of it by one, like the alias and pci addressing?

ultimately i want three monitors if possible.

 

    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>

 

 

so i am relatively sure i just increase heads but does anyone recommend more vgamem? or any of the others?, i probably just want to do 1080p on all three monitors but technically could do up to 4k on one of them.

 

so i was wrong. according to the spice manaual you. duplicate the video card for windows vm (like mine), or increase the heads. on a single video card for linux.

 

unfortunately they don't show the details of what to make your second video card. also when i update and turn on . unraid. rips out the changes i made.

 

here is what i thought would be correct. alias changed for eachc. slot changed for. each. primary yes only on first.

 

    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='no'/>
      <alias name='video1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='no'/>
      <alias name='video2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </video>

 

SOLVED....

<video>
  <model type="qxl" ram="65536" vram="65536" vgamem="16384" heads="1" primary="yes"/>
  <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
</video>
<video>
  <model type="qxl" ram="65536" vram="65536" vgamem="16384" heads="1"/>
  <address type="pci" domain="0x0000" bus="0x04" slot="0x01" function="0x0"/>
</video>
<video>
  <model type="qxl" ram="65536" vram="65536" vgamem="16384" heads="1"/>
  <address type="pci" domain="0x0000" bus="0x04" slot="0x02" function="0x0"/>
</video>
 

 

 

 

Edited by xtrap225
Link to comment

i have another one. the mouse stops working after enough updates and what not go in on my windows 11 vm.  seems to be spice related cause vnc doesn't have that issue.

i have tried installing the latest virtio-win-0.1.240-1.iso but that doesn't help.

 

does anyone know how to get the mouse to behave properly? the strange thing is that after a fresh install it work but as time goes one it just goes chonky on me, and doesn't. work almost at all. i have to move around the vm with keyboard.

 

if i use remote-viewer i can see this when i go in and out of the vm window (shift+F12).

 

(remote-viewer:40158): GSpice-WARNING **: 19:21:59.987: Mouse acceleration code missing for your platform

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.