KVM VNC Port = -1 confuses noVNC
|Category:||Core & System|
|Target version:||Release 4.4|
|Affected Versions:||OpenNebula 3.4|
In my template, I have 'GRAPHICS = [type="vnc",listen="0.0.0.0", port="-1", keymap="fr"]' This sets the VNC port to be the first free port above 5900 at the time the VM is launched. I am using KVM.
This config breaks noVNC. (because OpenNebula things the VNC port is VNC_BASE_PORT + vm_port == 4999 bydefault)
I propose the following workaround : if hypervisor is KVM and vnc port is set to -1 then search for the correct VNC port (virsh dumpxml #vmid | grep vnc).
It's low priority and I could live without the noVNC support but if you have a few minutes and the implementation is not too messy, that would be great.
bug #1264: Do not allow wrong number in GRAPHICS/PORT; i.e. floats, <0, strings...
#1 Updated by Hector Sanjuan about 9 years ago
- Category set to Sunstone
If you want OpenNebula to choose a VNC port for you, you can just avoid specifying PORT in the GRAPHICS section. this will not be the first available port though, but base_port+vmid.
As things are, OpenNebula should know a priori which port VNC has for each VM.