[SOLVED] Siimultaneous Spice Client Connections

blackpaw

Active Member
Nov 1, 2013
276
8
38
Apparently experimental support has been in the spice server for this since spice 0.10

http://www.spice-space.org/page/Features/MultipleClients

One just needs to set
export SPICE_DEBUG_ALLOW_MC=1

before launching the qemu vm.

Not sure where to set this on proxmox - I tried globally via /etc/profile but that didn't work.

Any suggestions?
 
Last edited:

blackpaw

Active Member
Nov 1, 2013
276
8
38
Well it took me a while, but I figured out where to set it and it does work.

WARNING:Involves editing ProxMox perl code and hence totally unsupported.

Edit /usr/share/perl5/PVE/Tools.pm

Add the following before line 325:

Code:
local $ENV{SPICE_DEBUG_ALLOW_MC} = "1";

So it should look like this:

Code:
    319         eval {
    320             local $ENV{LC_ALL} = $lang;
    321
    322             # suppress LVM warnings like: "File descriptor 3 left open";
    323             local $ENV{LVM_SUPPRESS_FD_WARNINGS} = "1";
    324             [B]local $ENV{SPICE_DEBUG_ALLOW_MC} = "1";[/B]
    325
    326             $pid = open3($writer, $reader, $error, @$cmd) || die $!;
    327
    328             # if we pipe fron STDIN, open3 closes STDIN, so we we
    329             # a perl warning "Filehandle STDIN reopened as GENXYZ .. "
    330             # as soon as we open a new file.
    331             # to avoid that we open /dev/null
    332             if (!ref($writer) && !defined(fileno(STDIN))) {
    333                 POSIX::close(0);
    334                 open(STDIN, "</dev/null");
    335             }
    336         };

The you should reboot the node, though probably restarting the pve manager service should be sufficient - didn't test that.

Then you can open as many spice connections as you like to the same VM, from the same PC or multiple ones. So far I haven't had any issues or crashes. Mouse and keyboard are shared between connections.
 
  • Like
Reactions: notdan.swim

aPollO

Active Member
Mar 6, 2014
141
8
38
Stuttgart, Germany
I know its old but i works like a charm.

Is there any possibility to add this permanently? Every time i update Proxmox it gets overwritten. Then i edit the Tools.pm but i don't know wich service i have to restart for getting it to work online. The only way is a restart of the pve-manager. But this reboots all my VMs, too.
 
Hi... Old post but not working here... I try both PVE 4.4 and PVE 5... I am able to start the VM after alter the Tools.pm.
When the VM start, I get this message:
qm start 100
(/usr/sbin/qm:8961): Spice-Warning **: reds.c:3378:do_spice_init: spice: allowing multiple client connections (crashy)

But when connect from different clients, they share the connecttion and there is the same one....

How can do it to work??? Thanks for any help.
 

blackpaw

Active Member
Nov 1, 2013
276
8
38
But when connect from different clients, they share the connecttion and there is the same one....

Thats what its meant
But when connect from different clients, they share the connecttion and there is the same one....


Thats what its meant to do - share the same screen across multiple spice displays. We used it in support so a person could easily observe what the other was doing.
 
But when connect from different clients, they share the connecttion and there is the same one....

Thats what its meant



Thats what its meant to do - share the same screen across multiple spice displays. We used it in support so a person could easily observe what the other was doing.
I see your point, but that's not the behavior I expected... I need that two or more people connected to VM without interfere with other, like RDP ir WTS does, you gotta?
 

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 your own in 60 seconds.

Buy now!