[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v2 12/12] spice: introduce listen type none



On Thu, May 12, 2016 at 08:43:38AM +0200, Pavel Hrdina wrote:
> > > @@ -21630,8 +21661,6 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
> > >      }
> > >
> > >      for (i = 0; i < def->nListens; i++) {
> > > -        if (def->listens[i].type == VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE)
> > > -            continue;
> > >          if (flags & VIR_DOMAIN_DEF_FORMAT_MIGRATABLE) {
> > >              if (def->listens[i].fromConfig)
> > >                  continue;
> > > @@ -21644,6 +21673,13 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
> > >                  def->listens[i].type == VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_SOCKET &&
> > >                  !def->listens[i].autogenerated)
> > >                  continue;
> > > +
> > > +            /* The new listen type none is in the migratable XML represented as
> > > +             * port=0 and autoport=no because old libvirt support this
> > > +             * configuration for spice. */
> > > +            if (def->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE &&
> > > +                def->listens[i].type == VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE)
> > > +                continue;
> > >          }
> > >          if (!children) {
> > >              virBufferAddLit(buf, ">\n");
> > > diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> > > index b911076..64b383d 100644
> > > --- a/src/qemu/qemu_command.c
> > > +++ b/src/qemu/qemu_command.c
> > > @@ -7635,6 +7635,9 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg,
> > >          break;
> > >
> > >      case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE:
> > > +        /* QEMU requires either port or tls-port to be specified */
> > > +        virBufferAddLit(&opt, "port=0,");
> > 
> > Does it?
> > qemu-system-x86_64 -spice gl=on starts fine. It needs at least an
> > argument though (that looks like a bug)
> 
> qemu doesn't allow to start if there is spice without arguments.  So in case
> that there isn't anything else to add, like the gl=on we need to add port=0

The comment which was used previously was probably more explicit than
the new one:
    /* If we did not add any SPICE arguments, add a dummy 'port=0' one
     * as -spice alone is not allowed on QEMU command line
     */
QEMU does not care which argument is there after -spice, port/tls-port
are good to use for that purpose as if they are set to 0 they will be ignored.

Christophe

Attachment: signature.asc
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]