[Spice-devel] 答复: The second client cannot redirect USB
Victor Toso
victortoso at redhat.com
Tue Nov 22 08:45:07 UTC 2022
Hi,
On Mon, Nov 21, 2022 at 08:44:49AM +0000, 韩雪峰 wrote:
> Hi,
> Thanks for your reply. But If I want to support multiple
> channels for USB redirection when multiple clients connect to a
> same VM, do you know which project includes the code about USB
> channels ? Spice ? or QEMU?
As Frediano pointed out, USB redirection with SPICE is bounded to
the first connected SPICE client.
You can reconfigure your VM to have a TCP backend for your USB
devices, the libvirt change would look like this:
<redirdev bus='usb' type='tcp'>
<source mode='bind' host='localhost' service='5550'/>
<protocol type='raw'/>
<address type='usb' bus='0' port='3'/>
</redirdev>
And then, you can use usbredirect (from usbredir project) to
redirect USB devices from multiple clients.
Note that this is will use plain usbredir protocol over TCP, it
isn't secure channel like what SPICE provides.
Cheers,
Victor
> Thanks and Regards,
> Xuefeng
>
> 发件人: Frediano Ziglio <freddy77 at gmail.com>
> 发送时间: 2022年11月18日 20:52
> 收件人: 韩雪峰 <hanxuefeng at 360.cn>
> 抄送: spice-devel at lists.freedesktop.org
> 主题: Re: [Spice-devel] The second client cannot redirect USB
>
> Il giorno ven 18 nov 2022 alle ore 10:21 韩雪峰 <hanxuefeng at 360.cn<mailto:hanxuefeng at 360.cn>> ha scritto:
> Hello,
>
> When I used two client to connect to a same one VM by spice
> with setting “SPICE_DEBUG_ALLOW_MC=1”, the two clients
> worked, and the first client could redirect USB. However,
> the second client could not redirect USB device, It shows
> like the picture: [cid:image001.png at 01D8FDC6.C4D82080]
>
> I’m sure that there’re enough channels for USB redirection.
>
> Is this a problem? Or Is there any way that could resolve the second client’s USB redirection problem?
>
> Thanks and Regards,
>
> Xuefeng
>
> Currently all character device channels (including USB one) do not support multiple channels, so the first client takes them all.
>
> Frediano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20221122/bba3b6e2/attachment.sig>
More information about the Spice-devel
mailing list