From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] libxl: Set VNC password through QMP Date: Thu, 9 Feb 2012 06:28:34 +0000 Message-ID: <1328768914.13189.70.camel@dagon.hellion.org.uk> References: <1328701798-30808-1-git-send-email-anthony.perard@citrix.com> <1328719630.6133.72.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Anthony PERARD Cc: Xen Devel , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Wed, 2012-02-08 at 17:24 +0000, Anthony PERARD wrote: > On Wed, 8 Feb 2012, Ian Campbell wrote: > > > @@ -287,13 +285,16 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc, > > > } > > > > > > if (strchr(listen, ':') != NULL) > > > - flexarray_append(dm_args, > > > - libxl__sprintf(gc, "%s%s", listen, > > > - info->vncunused ? ",to=99" : "")); > > > + vncarg = libxl__sprintf(gc, "%s", listen); > > > else > > > - flexarray_append(dm_args, > > > - libxl__sprintf(gc, "%s:%d%s", listen, display, > > > - info->vncunused ? ",to=99" : "")); > > > + vncarg = libxl__sprintf(gc, "%s:%d", listen, display); > > > + if (info->vncpasswd && info->vncpasswd[0]) { > > > + vncarg = libxl__sprintf(gc, "%s,password", vncarg); > > > + } > > > + if (info->vncunused) { > > > + vncarg = libxl__sprintf(gc, "%s,to=99", vncarg); > > > > Not new, but I've been meaning to ask: what is to=99 for here? It seems > > a bit arbitrary and the default behaviour without it appears to be to > > keep looking for an available port which sounds like what we want. > > QEMU will search for an open port until it reach the vnc display port 99 > (5999 TCP port). > > For the 99, I probably read this number somewhere. But after checking in > QEMU code, I do not see any limitation for this number. So we could > probably change this number for the port number max (-5900, default vnc > port). Can we not just omit it altogether and let qemu do its default thing? Ian.