VNC Failed to connect to server (code: 1006)

Hi, I have imported 2 virtual machines.

If I try to open VNC console on one of this, I can. But, if i try to open VNC console with the other VM I have this error:

VNC Failed to connect to server (code: 1006)

Any idea? In all machines I have configured:

remotedisplay.vnc.enabled = "TRUE"
remotedisplay.vnc.ip = "0.0.0.0"
remotedisplay.vnc.port = “500x”

Hi Sergi,
if you want to import a VM that is currently running in vCenter you have to set the following settings before importing it:

remotedisplay.vnc.enabled = "TRUE"
remotedisplay.vnc.ip = “0.0.0.0”

However if you’ve set remotedisplay.vnc.port = “500x”, if that’s what you’ve entered “500x” it won’t work. You must set a different VNC port
for each VM that is going to be imported and it expects to be a number.

You must set a port number that should be higher than 5900 and that is not in conflict with any current VM running in OpenNebula. OpenNebula for new VMs (not imported)
will assign the port 5900 + VM_id (if it’s available of course if not it will choose a different one), so for example if VM has id 4 the VNC port will be 5904 and the remotedisplay.vnc.port will be set to that number if VM ID is 80, port would be 5980.

However, in your case if you’re importing it you must set a VNC port that is not being used so knowing how OpenNebula assigns the ports you must choose that port. Also I’m afraid that you would have to reimport the VM again once you’ve set the remotedisplay.vnc.port in vCenter.

Cheers!

Hi,

It works!

Thanks for the reply.