Edwin Zhai
2005-Aug-27 13:44 UTC
[Xen-devel] [PATCH][VT] add a new option for spawning vncviewer
add a new option for spawning vncviewer Signed-off-by: Edwin Zhai <edwin.zhai@intel.com> Signed-off-by: Arun Sharma <arun.sharma@intel.com> diff -r fa0754a9f64f -r 56dd9a7b37f9 tools/examples/xmexample.vmx --- a/tools/examples/xmexample.vmx Wed Aug 24 20:29:21 2005 +++ b/tools/examples/xmexample.vmx Thu Aug 25 11:20:22 2005 @@ -73,6 +73,10 @@ vnc=1 #---------------------------------------------------------------------------- +# enable spawning vncviewer(only valid when vnc=1), default = 1 +vncviewer=1 + +#---------------------------------------------------------------------------- # no graphics, use serial port #nographic=0 diff -r fa0754a9f64f -r 56dd9a7b37f9 tools/python/xen/xm/create.py --- a/tools/python/xen/xm/create.py Wed Aug 24 20:29:21 2005 +++ b/tools/python/xen/xm/create.py Thu Aug 25 11:20:22 2005 @@ -103,12 +103,13 @@ fn=set_true, default=0, use="Connect to the console after the domain is created.") -gopts.var(''vnc'', val=''no|yes'', +gopts.var(''vncviewer'', val=''no|yes'', fn=set_bool, default=None, use="""Spawn a vncviewer listening for a vnc server in the domain. The address of the vncviewer is passed to the domain on the kernel command line using ''VNC_SERVER=<host>:<port>''. The port used by vnc is 5500 + DISPLAY. A display value with a free port is chosen if possible. + Only valid when vnc=1. """) gopts.var(''name'', val=''NAME'', @@ -308,6 +309,10 @@ gopts.var(''nographic'', val=''no|yes'', fn=set_bool, default=0, use="Should device models use graphics?") + +gopts.var(''vnc'', val='''', + fn=set_value, default=None, + use="""Should the device model use VNC?""") gopts.var(''sdl'', val='''', fn=set_value, default=None, @@ -442,7 +447,7 @@ """ args = [ ''memmap'', ''device_model'', ''cdrom'', ''boot'', ''fda'', ''fdb'', ''localtime'', ''serial'', ''macaddr'', ''stdvga'', - ''isa'', ''nographic'', ''vnc'', ''sdl'', ''display''] + ''isa'', ''nographic'', ''vnc'', ''vncviewer'', ''sdl'', ''display''] for a in args: if (vals.__dict__[a]): config_devs.append([a, vals.__dict__[a]]) @@ -606,7 +611,7 @@ """If vnc was specified, spawn a vncviewer in listen mode and pass its address to the domain on the kernel command line. """ - if not vals.vnc or vals.dryrun: return + if not (vals.vnc and vals.vncviewer) or vals.dryrun: return vnc_display = choose_vnc_display() if not vnc_display: opts.warn("No free vnc display") _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Pratt
2005-Aug-27 17:13 UTC
[Xen-devel] RE: [PATCH][VT] add a new option for spawning vncviewer
> add a new option for spawning vncviewerI''d like to see this option also spawn a vncviewer for paravirtualized guests. It should append the connect-back parameters to the vncviewer on the kernel command line. I think it should also be controlled via a ''-V'' option to xm create (cf -c or console). Ian> Signed-off-by: Edwin Zhai <edwin.zhai@intel.com> > Signed-off-by: Arun Sharma <arun.sharma@intel.com> > > diff -r fa0754a9f64f -r 56dd9a7b37f9 tools/examples/xmexample.vmx > --- a/tools/examples/xmexample.vmx Wed Aug 24 20:29:21 2005 > +++ b/tools/examples/xmexample.vmx Thu Aug 25 11:20:22 2005 > @@ -73,6 +73,10 @@ > vnc=1 > > > #------------------------------------------------------------- > --------------- > +# enable spawning vncviewer(only valid when vnc=1), default = 1 > +vncviewer=1 > + > +#------------------------------------------------------------ > ---------- > +------ > # no graphics, use serial port > #nographic=0 > > diff -r fa0754a9f64f -r 56dd9a7b37f9 tools/python/xen/xm/create.py > --- a/tools/python/xen/xm/create.py Wed Aug 24 20:29:21 2005 > +++ b/tools/python/xen/xm/create.py Thu Aug 25 11:20:22 2005 > @@ -103,12 +103,13 @@ > fn=set_true, default=0, > use="Connect to the console after the domain is created.") > > -gopts.var(''vnc'', val=''no|yes'', > +gopts.var(''vncviewer'', val=''no|yes'', > fn=set_bool, default=None, > use="""Spawn a vncviewer listening for a vnc > server in the domain. > The address of the vncviewer is passed to the > domain on the kernel command > line using ''VNC_SERVER=<host>:<port>''. The port > used by vnc is 5500 + DISPLAY. > A display value with a free port is chosen if possible. > + Only valid when vnc=1. > """) > > gopts.var(''name'', val=''NAME'', > @@ -308,6 +309,10 @@ > gopts.var(''nographic'', val=''no|yes'', > fn=set_bool, default=0, > use="Should device models use graphics?") > + > +gopts.var(''vnc'', val='''', > + fn=set_value, default=None, > + use="""Should the device model use VNC?""") > > gopts.var(''sdl'', val='''', > fn=set_value, default=None, > @@ -442,7 +447,7 @@ > """ > args = [ ''memmap'', ''device_model'', ''cdrom'', > ''boot'', ''fda'', ''fdb'', ''localtime'', ''serial'', > ''macaddr'', ''stdvga'', > - ''isa'', ''nographic'', ''vnc'', ''sdl'', ''display''] > + ''isa'', ''nographic'', ''vnc'', ''vncviewer'', ''sdl'', > ''display''] > for a in args: > if (vals.__dict__[a]): > config_devs.append([a, vals.__dict__[a]]) @@ -606,7 > +611,7 @@ > """If vnc was specified, spawn a vncviewer in listen mode > and pass its address to the domain on the kernel command line. > """ > - if not vals.vnc or vals.dryrun: return > + if not (vals.vnc and vals.vncviewer) or vals.dryrun: return > vnc_display = choose_vnc_display() > if not vnc_display: > opts.warn("No free vnc display") > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Edwin Zhai
2005-Aug-30 10:13 UTC
[Xen-devel] Re: [PATCH][VT] add a new option for spawning vncviewer
On 18:13 Sat 27 Aug , Ian Pratt wrote:> > > add a new option for spawning vncviewer > > I''d like to see this option also spawn a vncviewer for paravirtualized > guests. It should append the connect-back parameters to the vncviewer onauto starting vncserver need proper configuration in xenU image(such as /etc/ & ~/.vnc/), which does not always exist.> the kernel command line.base kernel doesn''t support vnc command line, and start vncserver in xenU kernel is tricky. what''s your opinion?> > I think it should also be controlled via a ''-V'' option to xm create (cf > -c or console). > > Ian > > > Signed-off-by: Edwin Zhai <edwin.zhai@intel.com> > > Signed-off-by: Arun Sharma <arun.sharma@intel.com> > > > > diff -r fa0754a9f64f -r 56dd9a7b37f9 tools/examples/xmexample.vmx > > --- a/tools/examples/xmexample.vmx Wed Aug 24 20:29:21 2005 > > +++ b/tools/examples/xmexample.vmx Thu Aug 25 11:20:22 2005 > > @@ -73,6 +73,10 @@ > > vnc=1 > > > > > > #------------------------------------------------------------- > > --------------- > > +# enable spawning vncviewer(only valid when vnc=1), default = 1 > > +vncviewer=1 > > + > > +#------------------------------------------------------------ > > ---------- > > +------ > > # no graphics, use serial port > > #nographic=0 > > > > diff -r fa0754a9f64f -r 56dd9a7b37f9 tools/python/xen/xm/create.py > > --- a/tools/python/xen/xm/create.py Wed Aug 24 20:29:21 2005 > > +++ b/tools/python/xen/xm/create.py Thu Aug 25 11:20:22 2005 > > @@ -103,12 +103,13 @@ > > fn=set_true, default=0, > > use="Connect to the console after the domain is created.") > > > > -gopts.var(''vnc'', val=''no|yes'', > > +gopts.var(''vncviewer'', val=''no|yes'', > > fn=set_bool, default=None, > > use="""Spawn a vncviewer listening for a vnc > > server in the domain. > > The address of the vncviewer is passed to the > > domain on the kernel command > > line using ''VNC_SERVER=<host>:<port>''. The port > > used by vnc is 5500 + DISPLAY. > > A display value with a free port is chosen if possible. > > + Only valid when vnc=1. > > """) > > > > gopts.var(''name'', val=''NAME'', > > @@ -308,6 +309,10 @@ > > gopts.var(''nographic'', val=''no|yes'', > > fn=set_bool, default=0, > > use="Should device models use graphics?") > > + > > +gopts.var(''vnc'', val='''', > > + fn=set_value, default=None, > > + use="""Should the device model use VNC?""") > > > > gopts.var(''sdl'', val='''', > > fn=set_value, default=None, > > @@ -442,7 +447,7 @@ > > """ > > args = [ ''memmap'', ''device_model'', ''cdrom'', > > ''boot'', ''fda'', ''fdb'', ''localtime'', ''serial'', > > ''macaddr'', ''stdvga'', > > - ''isa'', ''nographic'', ''vnc'', ''sdl'', ''display''] > > + ''isa'', ''nographic'', ''vnc'', ''vncviewer'', ''sdl'', > > ''display''] > > for a in args: > > if (vals.__dict__[a]): > > config_devs.append([a, vals.__dict__[a]]) @@ -606,7 > > +611,7 @@ > > """If vnc was specified, spawn a vncviewer in listen mode > > and pass its address to the domain on the kernel command line. > > """ > > - if not vals.vnc or vals.dryrun: return > > + if not (vals.vnc and vals.vncviewer) or vals.dryrun: return > > vnc_display = choose_vnc_display() > > if not vnc_display: > > opts.warn("No free vnc display") > > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Pratt
2005-Aug-30 10:28 UTC
[Xen-devel] RE: [PATCH][VT] add a new option for spawning vncviewer
> > I''d like to see this option also spawn a vncviewer for > paravirtualized > > guests. It should append the connect-back parameters to the > vncviewer > > on > auto starting vncserver need proper configuration in xenU > image(such as /etc/ & ~/.vnc/), which does not always exist. > > the kernel command line. > base kernel doesn''t support vnc command line, and start > vncserver in xenU kernel is tricky. > what''s your opinion?We should just spawn the viewer and put the details on the kernel command line, and leave it to the guest to start the server and issue the vnconnect. See tools/examples/vnc/* We''ve used this to start vnc servers for RHEL 3/4, Debian, SuSE Pro/SLES etc. Ian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Edwin Zhai
2005-Aug-31 05:54 UTC
[Xen-devel] Re: [PATCH][VT] add a new option for spawning vncviewer
On 11:28 Tue 30 Aug , Ian Pratt wrote:> > > I''d like to see this option also spawn a vncviewer for > > paravirtualized > > > guests. It should append the connect-back parameters to the > > vncviewer > > > on > > auto starting vncserver need proper configuration in xenU > > image(such as /etc/ & ~/.vnc/), which does not always exist. > > > the kernel command line. > > base kernel doesn''t support vnc command line, and start > > vncserver in xenU kernel is tricky. > > what''s your opinion? > > We should just spawn the viewer and put the details on the kernel > command line, and leave it to the guest to start the server and issue > the vnconnect. See tools/examples/vnc/*how about this one? use -V command line but not "vncviewer" configuration, which is suitable for both vmx and xenU.> > We''ve used this to start vnc servers for RHEL 3/4, Debian, SuSE Pro/SLES > etc. > > Ian_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Pratt
2005-Aug-31 08:20 UTC
[Xen-devel] RE: [PATCH][VT] add a new option for spawning vncviewer
> > We should just spawn the viewer and put the details on the kernel > > command line, and leave it to the guest to start the server > and issue > > the vnconnect. See tools/examples/vnc/* > how about this one? > use -V command line but not "vncviewer" configuration, which > is suitable for both vmx and xenU.I guess I agree that its slightly odd to have a configuration parameter (as opposed to command line flag) that causes a viewer to be spawned. We certainly don''t have a config parameter that forces the equivalent of ''-c''. It does mean that most VT users will have to remember to put ''-V'' on the command line, which is why I wouldn''t object to retaining the ''vncviewer'' configuration option. Let''s see if anyone has strong views. It''s clear that we should put the hostip:port number where the libvncserver is running somewhere into xenstore, so we can query it in the same ay we do for console ttys. [Incidently, does anyone take objection to using ''-V''? ''-V'' is sometimes used to mean ''version'', but I don''t think that''s a problem.] Ian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel