[one-users] Xen driver and automatic VNC port generation

Ruben S. Montero rubensm at dacya.ucm.es
Thu Oct 7 14:51:06 PDT 2010


Hi

Yes this is a Xen specific bug. vncdisplay sets the port by adding 5900.
That is already done by OpenNebula (e.g. to use it with KVM).

So your solution seems fine for the port generation but, if the port is not
generated by OpenNebula we will be substracting 5900...

Thanks for the feedback!

Ruben

On Wed, Oct 6, 2010 at 5:17 PM, Tiago Batista <tiagosbatista at gmail.com>wrote:

> Hello all
>
> I am using Centos, and to be honnest I am not sure if this is platform
> specific, but the standard port generation code for xen does not work here
> (both 2.0 beta 1 and rc1)
>
> The following patch solves it but forces the base port in oned.conf to be
> set to 5900 if using the xen driver.
>
> I rememmber reading somewhere that the port number is 5900 + vnc  display
> number... In this case I used the generated port number to calculate the
> display number, but given that the port number is calculated from the VM id,
> I expect that there should be a cleaner way to do this!
>
> Anyway.... This solves my problem!
>
>
> --- one-2.0-beta1/src/vmm/XenDriver.cc    2010-07-27 15:34:04.000000000
> +0100
> +++ one-2.0-beta1_mod/src/vmm/XenDriver.cc    2010-09-21 10:07:32.000000000
> +0100
> @@ -364,12 +364,10 @@
>                  {
>                      file << ",vnclisten=" << listen;
>                  }
> -
>                  if ( !port.empty() )
>                  {
> -                    file << ",vncdisplay=" << port;
> +                    file << ",vncdisplay=" << (atoi(port.c_str())-5900);
>                  }
> -
>                  if ( !passwd.empty() )
>                  {
>                      file << ",vncpasswd=" << passwd;
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>


-- 
Dr. Ruben Santiago Montero
Associate Professor (Profesor Titular), Complutense University of Madrid

URL: http://dsa-research.org/doku.php?id=people:ruben
Weblog: http://blog.dsa-research.org/?author=7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20101007/dcca7489/attachment-0003.htm>


More information about the Users mailing list