How to fix VNC listening IP in Opennebula

Hello,

I am running a 5-Node frontend cluster using RAFT & using 5-Node CEPH cluster for data storage with a second IP pool for backend connectivity. So each server configured with two active IP addresses, one is routed to external and another is non-routed p2p node connectivity.

All running good except VNC access. While trying to get access using VNC client, in novnc log I am getting that VNC session trying to establish using non-routed IP instead of external facing IP and naturally getting failed.

So my question is how can I make sure that VNC will always use the primary IP which is routed to external. I am not getting any parameter to fix VNC listening IP.

Looking forward to hearing a solution from you soon, please.

Thank you.

Shaf

hi Shaf, this is the method I use, altho I wanted it to be routed on the internal IPs only, and make sure VNC traffic is only going from hypervisor to the VNC proxy (for sunstone web interface only).

On every hypervisor I made an entry in /etc/hosts, called “vnc-if”, pointing to the internal IP. (you could do the same, but then for your external IPs)
Example
Hypervisor 1 - has IP 10.0.0.1 - /etc/hosts will contain:
10.0.0.1 vnc-if
Hypervisor 2 - has IP 10.0.0.2 - /etc/hosts will contain:
10.0.0.2 vnc-if
…
etc etc

Next, in all your VM Templates, where it says “Listen on IP” use the address “vnc-if”.
image.
Now you can even (live)migrate VM’s from hypervisor to hypervisor, while forcing VNC traffic over the IP or interface you want.

1 Like