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

Tiago Batista tiagosbatista at gmail.com
Fri Oct 8 06:56:58 PDT 2010


In the case of VNC_BASE_PORT=6000 and VM_ID=0

The opennebula core in both cases generates a port value of 6000
(BASE+ VM_ID), now with my proposal the vncdisplay gets calculated
like this:

port-5900, meaning that the result is 10, wich gets booted back to
6000 by xen when it adds 5900 to the vncdisplay value.

If I am getting what you want correctly, you want the vncdisplay value
to be calculated like this:

port-VNC_BASE_PORT, meaning a result of 0 (VM_ID) that xen will
translate to 5900 which is not the intended result. In fact if this
code were to be in place, the equivalent vncdisplay=VM_ID could be
used and the server would always be listening on 5900+VM_ID,
completely ignoring VNC_BASE_PORT.

Your proposal is a valid way of calculating a port number, yet the
calculated port will be different than the one calculated for KVM
using the same values as base.

Tiago

On Fri, Oct 8, 2010 at 2:35 PM, Ruben S. Montero <rubensm at dacya.ucm.es> wrote:
>>
>> Meaning that the port if not specifed on the template takes the value
>> of VNC_BASE_PORT + VM_ID. This generates a valid port number for KVM.
>> In the case of Xen however, it would result on a vnc server listening
>> on port+5900. So, the opennebula xen driver should subtract that 5900
>> that will be added by xen on the next step.
>
> Yes, that the reason to subtract VNC_BASE_PORT. Note that you could
> use any port number there not only 5900
>
> Cheers
>
> Ruben
>



More information about the Users mailing list