[Spice-devel] [PATCH spice-streaming-agent 1/1] rename the virtio port to com.redhat.spice.stream.0
Lukáš Hrázký
lhrazky at redhat.com
Fri Mar 23 14:09:54 UTC 2018
On Fri, 2018-03-23 at 14:22 +0100, Christophe de Dinechin wrote:
> > On 23 Mar 2018, at 13:52, Lukáš Hrázký <lhrazky at redhat.com> wrote:
> >
> > On Fri, 2018-03-23 at 13:41 +0100, Christophe de Dinechin wrote:
> > > > On 23 Mar 2018, at 13:36, Lukáš Hrázký <lhrazky at redhat.com> wrote:
> > > >
> > > > On Fri, 2018-03-23 at 12:00 +0100, Christophe de Dinechin wrote:
> > > > > > On 22 Mar 2018, at 14:13, Lukáš Hrázký <lhrazky at redhat.com> wrote:
> > > > > >
> > > > > > The name "com.redhat.stream.0" is too generic and in no way denotes it
> > > > > > belongs to SPICE.
> > > > >
> > > > > This also would need to be sync’d with libvirt and virt-manager, no? I’ve not checked how Boxes does it.
> > > > >
> > > > > <channel type='unix'>
> > > > > <target type='virtio' name='org.qemu.guest_agent.0'/>
> > > > > <address type='virtio-serial' controller='0' bus='0' port='1'/>
> > > > > </channel>
> > > > > <channel type='spicevmc'>
> > > > > <target type='virtio' name='com.redhat.spice.0'/>
> > > > > <address type='virtio-serial' controller='0' bus='0' port='2'/>
> > > > > </channel>
> > > > > <channel type='spiceport'>
> > > > > <source channel='com.redhat.stream.0'/>
> > > > > <target type='virtio' name='com.redhat.stream.0'/>
> > > > > <address type='virtio-serial' controller='0' bus='0' port='3'/>
> > > > > </channel>
> > > >
> > > > Where is this XML excerpt coming from?
> > >
> > > virsh edit <machine-name>
> >
> > Ok, and you've put the "com.redhat.stream.0" yourself, I think?
>
> Well, that’s a choice that virt-manager provides by default in the selection menu. I could have changed it (only at creation time as I mentioned), but the defaults are provided by libvirt or virt-manager (not sure, I’ve not looked into it).
Is it in "Add Hardware" -> "Channel"? I don't have the
"com.redhat.stream.0" option myself. What version of libvirt and on
what OS? I'm on Gentoo. As I said, I haven't found
"com.redhat.stream.0" in libvirt sources, while "com.redhat.spice.0" is
there (so that's where I expect it to be, also checked virt-manager).
So unless it was patched in by packaging (which I find weird too), I
have no idea where it's coming from.
> > If not,
> > I've missed something somewhere, but I would guess it has to be in
> > libvirt and I haven't found it there.
> >
> > I suppose we'll want to add it to libvirt eventually, and better sort
> > out the name for it before we do :)
>
> Yes. Daniel might help us following the correct procedure there, and maybe provide naming guidelines too.
>
> >
> > > > I've grepped the libvirt repo,
> > > > found "com.redhat.spice.0" in there, but not "com.redhat.stream.0", so
> > > > I assumed it was not added in there yet. AFAIK as of now we add this
> > > > channel manually to the XML when setting up a VM.
> > > >
> > > > > Channel names are not exactly consistent, at least you are going in the right direction ;-)
> > > > >
> > > > > BTW, just discovered that you can add an arbitrary name when creating a channel, but I’ve not found a GUI way to change it once it’s been created.
> > > >
> > > > I think I've edited this always in the XML (the few times I've done it
> > > > when setting up my test VM).
> > > >
> > > > Cheers,
> > > > Lukas
> > > >
> > > > > >
> > > > > > Signed-off-by: Lukáš Hrázký <lhrazky at redhat.com>
> > > > > > ---
> > > > > > It would be better to name it something like "org.spice-space.stream.0"
> > > > > > but alas, we already have 'com.redhat.spice.0" and can hardly change
> > > > > > that.
> > > > > >
> > > > > > Though we do also seem to have "org.spice-space.webdav.0"...
> > > > > >
> > > > > > The server will need an update too, I'll do it if this gets acked.
> > > > > >
> > > > > > README | 12 ++++++------
> > > > > > data/90-spice-guest-streaming.rules | 2 +-
> > > > > > src/spice-streaming-agent.cpp | 2 +-
> > > > > > 3 files changed, 8 insertions(+), 8 deletions(-)
> > > > > >
> > > > > > diff --git a/README b/README
> > > > > > index 7e9a3c7..0d85916 100644
> > > > > > --- a/README
> > > > > > +++ b/README
> > > > > > @@ -13,7 +13,7 @@ Virtual Machine Configuration
> > > > > > =============================
> > > > > >
> > > > > > In order to set up streaming, qemu needs to expose a
> > > > > > -`com.redhat.stream.0` virtio port, associated with a
> > > > > > +`com.redhat.spice.stream.0` virtio port, associated with a
> > > > > > corresponding Spice port.
> > > > > >
> > > > > > Using virt-manager
> > > > > > @@ -21,8 +21,8 @@ Using virt-manager
> > > > > >
> > > > > > In the hardware details, click on "Add Hardware", then select
> > > > > > "Channel". Add a "Spice port" device type with the
> > > > > > -"com.redhat.stream.0" name. You also need to set "Channel" to
> > > > > > -"com.redhat.stream.0"
> > > > > > +"com.redhat.spice.stream.0" name. You also need to set "Channel" to
> > > > > > +"com.redhat.spice.stream.0"
> > > > > >
> > > > > >
> > > > > > Using libvirt
> > > > > > @@ -31,8 +31,8 @@ Using libvirt
> > > > > > [source,xml]
> > > > > > <devices>
> > > > > > <channel type='spiceport'>
> > > > > > - <source channel='com.redhat.stream.0'/>
> > > > > > - <target type='virtio' name='com.redhat.stream.0'/>
> > > > > > + <source channel='com.redhat.spice.stream.0'/>
> > > > > > + <target type='virtio' name='com.redhat.spice.stream.0'/>
> > > > > > </channel>
> > > > > > </devices>
> > > > > >
> > > > > > @@ -40,4 +40,4 @@ Using QEMU
> > > > > > ----------
> > > > > >
> > > > > > [source,sh]
> > > > > > --device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel1,id=channel1,name=com.redhat.stream.0 -chardev spiceport,name=com.redhat.stream.0,id=charchannel1
> > > > > > +-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel1,id=channel1,name=com.redhat.spice.stream.0 -chardev spiceport,name=com.redhat.spice.stream.0,id=charchannel1
> > > > > > diff --git a/data/90-spice-guest-streaming.rules b/data/90-spice-guest-streaming.rules
> > > > > > index 6cedd5c..5f74bd9 100644
> > > > > > --- a/data/90-spice-guest-streaming.rules
> > > > > > +++ b/data/90-spice-guest-streaming.rules
> > > > > > @@ -1,2 +1,2 @@
> > > > > > -ACTION=="add", SUBSYSTEM=="virtio-ports", ENV{DEVLINKS}=="/dev/virtio-ports/com.redhat.stream.0", MODE="0666"
> > > > > > +ACTION=="add", SUBSYSTEM=="virtio-ports", ENV{DEVLINKS}=="/dev/virtio-ports/com.redhat.spice.stream.0", MODE="0666"
> > > > > >
> > > > > > diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
> > > > > > index b39782c..eb469c8 100644
> > > > > > --- a/src/spice-streaming-agent.cpp
> > > > > > +++ b/src/spice-streaming-agent.cpp
> > > > > > @@ -480,7 +480,7 @@ done:
> > > > > >
> > > > > > int main(int argc, char* argv[])
> > > > > > {
> > > > > > - const char *streamport = "/dev/virtio-ports/com.redhat.stream.0";
> > > > > > + const char *streamport = "/dev/virtio-ports/com.redhat.spice.stream.0";
> > > > > > int opt;
> > > > > > const char *log_filename = NULL;
> > > > > > int logmask = LOG_UPTO(LOG_WARNING);
> > > > > > --
> > > > > > 2.16.2
> > > > > >
> > > > > > _______________________________________________
> > > > > > Spice-devel mailing list
> > > > > > Spice-devel at lists.freedesktop.org
> > > > > > https://lists.freedesktop.org/mailman/listinfo/spice-devel
> > > > >
> > > > >
> > > >
> > > > _______________________________________________
> > > > Spice-devel mailing list
> > > > Spice-devel at lists.freedesktop.org
> > > > https://lists.freedesktop.org/mailman/listinfo/spice-devel
> > >
> > >
> >
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/spice-devel
>
>
More information about the Spice-devel
mailing list