[one-users] Xen driver and automatic VNC port generation
tiagosbatista at gmail.com
Fri Oct 8 07:46:03 PDT 2010
allow me to re submit the previous patch, now in a safer version! This
one checks for a valid port number and fails the vm launch if an
invalid number is specified... I tested it with a base port of 700 and
the correct ports are automatically generated, and in the case of a
static port specification, it also listens on the correct port!
On Fri, Oct 8, 2010 at 2:56 PM, Tiago Batista <tiagosbatista at gmail.com> wrote:
> 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.
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1218 bytes
Desc: not available
More information about the Users