sparkysplace Posted August 31, 2016 Share Posted August 31, 2016 Hi All, I haven't see any posts in regards to using SPICE in 6.2.0-rc, but thought I'd share my experience for others looking to use SPICE (which, by the way, is incredibly slick). Unfortunately, it seems like SPICE support isn't included in the WebGUI yet, so it does require a bit of manual intervention with the XML file. NOTE: This example does NOT implement any security features whatsoever. If you don't want your VMs to be open to everyone, read up a little about implementing TLS or SSL. Step 1: Create your VM as you normally would, have it set for VNC. Step 2: Add the SPICE <graphics> section (overwrite any existing <graphics> section) <graphics type='spice' port='20001' autoport='no' listen='0.0.0.0'> <listen type='address' address='0.0.0.0'/> </graphics> Step 3: Add the SPICE Audio section (slot 0x06 is an unused address in my config, adjust as necessary so it isn't a duplicate). SPICE will pass audio from VM to guest. <sound model='ac97'> <alias name='sound0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </sound> Step 4: Add the QXL video section if it doesn't already exist <video> <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> And voila! You should be able to use something like virt-viewer on a Windows PC to access your VM GUI along with passthrough audio. This is very basic configuration, there are tons of other options that may or may not work yet such as guest additions (copy/paste, folder sharing, USB redirection, etc). Obviously this is a sort of workaround until the unRAID team officially slots in SPICE support - though including SPICE in the builds is a step in the right direction (I'm not a VNC fan). Quote Link to comment
dnLL Posted December 1, 2018 Share Posted December 1, 2018 So I know this is an old thread but I was wondering if you still got it working on 6.6 or if there is anything new implemented that would make this even easier? Quote Link to comment
dnLL Posted December 1, 2018 Share Posted December 1, 2018 So I installed virt-viewer on my Windows desktop and edited my VM's XML configuration file overwriting the VNC graphics with spice: <graphics type='spice' port='3001' autoport='no'> <listen type='address'/> </graphics> I also installed spice-vdagent on the VM, not sure if it was a necessary step or not but I did anyway: [vm-manjaro ~]# systemctl status spice-vdagentd ● spice-vdagentd.service - Agent daemon for Spice guests Loaded: loaded (/usr/lib/systemd/system/spice-vdagentd.service; indirect; vendor preset: disabled) Active: active (running) since Sat 2018-12-01 17:24:12 EST; 3s ago Process: 1619 ExecStart=/usr/bin/spice-vdagentd $SPICE_VDAGENTD_EXTRA_ARGS (code=exited, status=0/SUCCESS) Main PID: 1620 (spice-vdagentd) Tasks: 1 (limit: 2372) Memory: 360.0K CGroup: /system.slice/spice-vdagentd.service └─1620 /usr/bin/spice-vdagentd Dec 01 17:24:12 vm-manjaro systemd[1]: Starting Agent daemon for Spice guests... Dec 01 17:24:12 vm-manjaro systemd[1]: Started Agent daemon for Spice guests. Finally, I made sure iptables was disabled. Trying to connect from my Windows desktop, I get the following: C:\Program Files\VirtViewer v6.0-256\bin>remote-viewer.exe spice://192.168.1.246:3001/ --debug C:\Program Files\VirtViewer v6.0-256\bin> (remote-viewer.exe:17924): Gtk-WARNING **: Could not find signal handler 'virt_viewer_window_menu_change_cd_activate'. Did you compile with -rdynamic? (remote-viewer.exe:17924): virt-viewer-DEBUG: Opening display to spice://192.168.1.246:3001/ (remote-viewer.exe:17924): virt-viewer-DEBUG: Guest (NULL) has a spice display (remote-viewer.exe:17924): virt-viewer-DEBUG: After open connection callback fd=-1 (remote-viewer.exe:17924): virt-viewer-DEBUG: Opening connection to display at spice://192.168.1.246:3001/ (remote-viewer.exe:17924): virt-viewer-DEBUG: New spice channel 000000000443F830 SpiceMainChannel 0 (remote-viewer.exe:17924): virt-viewer-DEBUG: notebook show status 000000000433FE60 (remote-viewer.exe:17924): virt-viewer-DEBUG: main channel: failed to connect Could not connect to 192.168.1.246: No connection could be made because the target machine actively refused it. (remote-viewer.exe:17924): virt-viewer-DEBUG: Destroy SPICE channel SpiceMainChannel 0 (remote-viewer.exe:17924): virt-viewer-DEBUG: zap main channel Same with the GUI, it says the target machine actively refuses the connection. I get the same error if I try a different port. What am I doing wrong? Quote Link to comment
scorcho99 Posted December 5, 2018 Share Posted December 5, 2018 I use virt-manager with spice VMs. I don't have my notes in front of me but I believe I used space invader one's youtube tutorial on virt-manager setup and then did similar to use to modify the VM to use spice display. AFAIK virt-manager is not available for Windows however. Quote Link to comment
flinte Posted August 17, 2019 Share Posted August 17, 2019 (edited) resurrecting this old thread just to say you can install virt-manager fairly easily on windows thanks to Windows Subsystem Linux (WSL). You'll merely need to enable WSL then install your favorite distro in WSL, then install virt-manager on that distro. Finally you'll need to install an X window manager like Xming on your windows machine. Edited August 17, 2019 by flinte Quote Link to comment
Econaut Posted January 13, 2022 Share Posted January 13, 2022 Would be great if UNRAID would include SPICE support natively for VMs. The VNC remote viewer is super buggy and copy-paste doesn't even really work. Quote Link to comment
dja Posted November 29, 2022 Share Posted November 29, 2022 On 1/13/2022 at 10:46 AM, Econaut said: Would be great if UNRAID would include SPICE support natively for VMs. The VNC remote viewer is super buggy and copy-paste doesn't even really work. So it looks like it Spice IS an option now. I can't seem to get copy paste working with a Windows 11 VM. Are there add-ons that need to be installed for Unraid as you would on the client itself? (See Windows installers here--> https://www.spice-space.org/download.html) Quote Link to comment
SimonF Posted November 29, 2022 Share Posted November 29, 2022 (edited) @djait is likely you need to have the spice vdagent and update the XML. it is also required for VNC copy paste. I posted some info on the thread below. Edited November 29, 2022 by SimonF Quote Link to comment
SimonF Posted December 5, 2022 Share Posted December 5, 2022 @dja lets revert back here. Also, off topic but related, have you figured out how to save the remote viewer recent connections? That seems to be broken. I saw some off site posts that seem to indicate it may be a known issue. I know you can call the .exe from CLI and pass the URL to start, but that's a bit clunky when the app has a recent list available. (maybe) Not tried to save connections will have a look. I have 2 Virt serials because I have two channels defined one for QEMU guest agent and one for the Spice VDAgent Quote Link to comment
dja Posted December 5, 2022 Share Posted December 5, 2022 40 minutes ago, SimonF said: @dja lets revert back here. Also, off topic but related, have you figured out how to save the remote viewer recent connections? That seems to be broken. I saw some off site posts that seem to indicate it may be a known issue. I know you can call the .exe from CLI and pass the URL to start, but that's a bit clunky when the app has a recent list available. (maybe) Not tried to save connections will have a look. I have 2 Virt serials because I have two channels defined one for QEMU guest agent and one for the Spice VDAgent Sounds good. Thanks for working with me on this. I would normally just use RDP, but I am using work VPNs that disable split-tunnel and require this type of remote access. I've been having to use HyperV on my local workstation, but my sever is much better equipped hardware wise. I've been hoping for a good solution that has decent integration and copy/paste....Spice def. seems to be the way to go. Is the integration for copy/paste text only? Quote Link to comment
SimonF Posted December 5, 2022 Share Posted December 5, 2022 Does seem to do graphics also. I snipped this on my desktop Quote Link to comment
SimonF Posted December 5, 2022 Share Posted December 5, 2022 bug has been around for 5 years https://bugzilla.redhat.com/show_bug.cgi?id=1481957 Quote Link to comment
dja Posted December 5, 2022 Share Posted December 5, 2022 (edited) 6 hours ago, SimonF said: bug has been around for 5 years https://bugzilla.redhat.com/show_bug.cgi?id=1481957 Yeah I saw that..5 years!!?? A bit surprising it has persisted that long. It's pretty clumsy having to type that out every time. I guess I could make a batch file, but I couldn't get that to start right. , example C:\Program Files\VirtViewer v11.0-256\bin>start remote-viewer.exe spice://192.168.1.10:5901 App starts, but holds open the window with status updates. I guess it doesn't matter until I can get the clipboard to work, but something to look at if anyone cares. It is definitely better than VNC from my experience. Is there another viewer option for Spice? Edit- its working now! Yea!!!!! Edited December 6, 2022 by dja Quote Link to comment
dja Posted December 8, 2022 Share Posted December 8, 2022 (edited) Is it possible to get 4k resolution using Spice? (3840x2160) Edit- yes!! Edit the XML of your VM and change the video section for your virtual display device. Change vgamem from 16384 to: vgamem='65536' Example: <video> <model type='qxl' ram='131072' vram='65536' vgamem='65536' heads='1' primary='yes'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> Edited December 8, 2022 by dja 1 Quote Link to comment
SimonF Posted December 11, 2022 Share Posted December 11, 2022 On 12/8/2022 at 6:32 PM, dja said: Is it possible to get 4k resolution using Spice? (3840x2160) Edit- yes!! Edit the XML of your VM and change the video section for your virtual display device. Change vgamem from 16384 to: vgamem='65536' Example: <video> <model type='qxl' ram='131072' vram='65536' vgamem='65536' heads='1' primary='yes'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> Thanks for the info, will look to see if we can set to 65536 as a default. 1 Quote Link to comment
dja Posted December 12, 2022 Share Posted December 12, 2022 On 12/11/2022 at 6:37 AM, SimonF said: Thanks for the info, will look to see if we can set to 65536 as a default. Here is where I found the info if it is helpful: https://stafwag.github.io/blog/blog/2018/04/22/high-screen-resolution-on-a-kvm-virtual-machine-with-qxl/ Quote Link to comment
dja Posted January 19 Share Posted January 19 @SimonF could you post a Windows VM XML to look at? (W11 if you have it..) I had to create a new VM and while I can copy paste and type- the stupid mouse doesn't work! Uuuggh. Quote Link to comment
SimonF Posted January 19 Share Posted January 19 4 hours ago, dja said: @SimonF could you post a Windows VM XML to look at? (W11 if you have it..) I had to create a new VM and while I can copy paste and type- the stupid mouse doesn't work! Uuuggh. You need this <channel type='spicevmc'> <target type='virtio' name='com.redhat.spice.0'/> </channel> Do you have a physical secondary GPU attached? I have found mosue can disappear with physical GPU as 2nd. Dont forget you need t install vdagent also. Quote Link to comment
dja Posted January 20 Share Posted January 20 17 hours ago, SimonF said: You need this <channel type='spicevmc'> <target type='virtio' name='com.redhat.spice.0'/> </channel> Do you have a physical secondary GPU attached? I have found mosue can disappear with physical GPU as 2nd. Dont forget you need t install vdagent also. I do. I guess I can remove that and try. Quote Link to comment
SimonF Posted January 20 Share Posted January 20 25 minutes ago, dja said: I do. I guess I can remove that and try. I am still trying to find a fix if that is the issue. Quote Link to comment
dja Posted February 2 Share Posted February 2 (edited) On 1/20/2023 at 10:33 AM, SimonF said: I am still trying to find a fix if that is the issue. Is there anything else I can try? I have a Win10 machine working with copy paste, but no mouse. My VM XML is below. No video card passed in. https://pastebin.com/raw/GGuMMbfE Edited February 2 by dja Quote Link to comment
SimonF Posted February 3 Share Posted February 3 20 hours ago, dja said: Is there anything else I can try? I have a Win10 machine working with copy paste, but no mouse. My VM XML is below. No video card passed in. https://pastebin.com/raw/GGuMMbfE Not found a solution yet, will look more this weekend. Quote Link to comment
SimonF Posted February 3 Share Posted February 3 (edited) On 2/2/2023 at 9:01 PM, dja said: Is there anything else I can try? I have a Win10 machine working with copy paste, but no mouse. My VM XML is below. No video card passed in. https://pastebin.com/raw/GGuMMbfE Ok I think I have found the way to get the mouse to work. I had to change the following in XML, not sure why client mode doesn't work. Downside is that you may need to do SHIFT-F12 to release the mouse from the client. <graphics type='spice' autoport='yes' listen='0.0.0.0' keymap='en-gb'> <listen type='address' address='0.0.0.0'/> <mouse mode='server'/> </graphics> Edited February 4 by SimonF 1 Quote Link to comment
dja Posted February 4 Share Posted February 4 17 hours ago, SimonF said: Ok I think I have found the way to get the mouse to work. I had to change the following in XML, not sure why client mode doesn't work. Downside is that you need to do SHIFT-F12 to release the mouse from the client. <graphics type='spice' port='5900' autoport='yes' listen='0.0.0.0' keymap='en-gb'> <listen type='address' address='0.0.0.0'/> <mouse mode='server'/> <clipboard copypaste='yes'/> </graphics> Awesome, that did the trick, thanks!!! 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... (I manually started below) Is there something you can make them dependent on to ensure they run? Maybe I could set another account to run them. Quote Link to comment
SimonF Posted February 4 Share Posted February 4 2 hours ago, dja said: Awesome, that did the trick, thanks!!! 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... (I manually started below) Is there something you can make them dependent on to ensure they run? Maybe I could set another account to run them. Will check my Win11 as I dont have to start services. Quote Link to comment
Recommended Posts
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.