[Ovirt-devel] [PATCH server] allow admin to setup iptables port forwarding on server for a vm's vnc port

Mohammed Morsi mmorsi at redhat.com
Wed Jan 28 02:42:38 UTC 2009


David Lutterkort wrote:
> On Tue, 2009-01-27 at 18:28 -0500, Mohammed Morsi wrote:
>   
>> David Lutterkort wrote:
>>     
>>> Why does the user need to allocate the port manually ? Couldn't we do
>>> that internally when the VM is started and release the allocation when
>>> it's taken down ?
>>>   
>>>       
>> This is just allowing a vm admin to set the option via the wui. I'd
>> think we'd want the ability not to forward the vnc for deployments when
>> forwarding is unecessary.
>>     
>
> Sorry, I was a litttle obtuse in my comment: what I meant was: the user
> should just have a check box 'Forward VNC port locally' to turn
> forwarding on/off, and we'll allocate the port when the VM is started,
> and report it on the VM details screen. Otherwise, the admin has to find
> some way to track assigned VNC ports to avoid collisions.
>
> David
>
>
>   
To allocate the port automatically we'd need to keep track internally of
what ports are available, possibly doing something incremental (to what
maximum?) or better yet, keeping track which ones have been used through
the forward_vnc_column. We wouldn't just simply be able to use the vm's
vnc port as there could be multiple vm's running on multiple hosts with
the same vnc port.

Besides a bit of added complexity, I don't see any reason we couldn't
track which vnc port to use next from the ones already in the
forward_vnc_port column. I could also just add a uniqueness constraint
to the column and have the wui report it as being used upon and invalid
entry. Doing both would probably work best, prefilling in the textbox
with the next available value so that an administrator can still set it
to a custom value if desired.

  -Mo




More information about the ovirt-devel mailing list