On 03/22/2016 04:59 AM, Pavel Hrdina wrote:
> On Tue, Mar 22, 2016 at 09:49:34AM +0100, Christophe Fergeau wrote:
>> Hey,
>>
>> On Tue, Mar 22, 2016 at 09:13:44AM +0100, Pavel Hrdina wrote:
>>> On Mon, Mar 21, 2016 at 07:30:44PM -0400, Cole Robinson wrote:
>>>> Add support for SPICE listen over unix socket. This has been in qemu
>>>> since v2.3. The XML is:
>>>>
>>>> <spice socket='/path/to/socket'/>
>>>>
>>>> Which matches support for VNC listen over unix socket.
>>>>
>>>>
https://bugzilla.redhat.com/show_bug.cgi?id=1151761
>>
>>>> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-unix.xml
b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-unix.xml
>>>> new file mode 100644
>>>> index 0000000..6c6be44
>>>> --- /dev/null
>>>> +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-unix.xml
>>>> @@ -0,0 +1,27 @@
>>>> +<domain type='qemu'>
>>>> + <name>QEMUGuest1</name>
>>>> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
>>>> + <memory unit='KiB'>219136</memory>
>>>> + <currentMemory unit='KiB'>219136</currentMemory>
>>>> + <vcpu placement='static'>1</vcpu>
>>>> + <os>
>>>> + <type arch='i686'
machine='pc'>hvm</type>
>>>> + <boot dev='hd'/>
>>>> + </os>
>>>> + <clock offset='utc'/>
>>>> + <on_poweroff>destroy</on_poweroff>
>>>> + <on_reboot>restart</on_reboot>
>>>> + <on_crash>destroy</on_crash>
>>>> + <devices>
>>>> + <emulator>/usr/bin/qemu</emulator>
>>>> + <controller type='usb' model='none'
index='0'/>
>>>> + <controller type='pci' index='0'
model='pci-root'/>
>>>> + <input type='mouse' bus='ps2'/>
>>>> + <input type='keyboard' bus='ps2'/>
>>>> + <graphics type='spice'
socket='/tmp/spice.socket'/>
>>>
>>> This is an old way to specify listen type. It would be better to add a new
>>> <listen type='socket' socket='/tmp/spice.socket'/>.
Actually I'm working on
>>> this support and I have my patches almost finished but they depends on this
>>> patch series:
>>>
>>>
https://www.redhat.com/archives/libvir-list/2016-March/msg00631.html
>>>
>>> You can see my progress there:
>>>
>>>
https://github.com/Antique/libvirt/tree/spice-unix-socket
>>
>> We briefly discussed about this with Cole on IRC, and what you suggest
>> is indeed the way forward. His patch is a quick way to get
>> feature-parity with what VNC does, and we were not aware of your series.
>>
>> You seem to be adding
>> <listen type='socket' socket='/tmp/foo.sock'/>
>>
>> I think <listen type='unix' path='/tmp/foo.sock'/> would
be more
>> consistent with what is done for channels, /interface/source, ...
>>
Agreed, that seems more consistent to me.
>
> I know, Cole's patch is an easy and quick way but we will have to deal with it
> for the rest of libvirt's lifetime. That's why I've ended with rather
larger
> series that cleanup a lot of staff and introduce new listen type instead.
>
Right, but we already have to deal with that <graphics socket=.../> format for
VNC... not adding that to SPICE is also inconsistent. Just pointing it out,
doesn't matter to me much either way
That's a good point actually but I would rather have this inconsistency rather
than duplicating this information. We do the same for <listen
type='address'/>
but for backward compatibility and the same rule would apply to the VNC case
just to by compatible with old applications. This is a new design and a new
feature and I would like to avoid to having <graphics socket=.../> for SPICE.
Pavel