How to set up a VNC password on the template and also be able to change VNC resolution?

Hello all,

We have a couple of questions from a user. The first one is about putting a password for VNC on the VM template. We tried it by just adding a password on the VM template but it seems it is not working. Therefore, I would like to ask if someone has any experience with it. I guess for getting this it is necessary to make some configuration on the sunstone server or on the OpenNebula hosts.

The second question is about changing the resolution of the VNC session, is that possible? We tried it with xrandr command but it did not work. Does also have any experience with this?

Thanks in advance,
Esteban

Hi Esteban

Is quite easy to set the VNC/SPICE pass in your VM template. If the user is able to modify the template he/she has to add PASSWD line into GRAPHICS section:

GRAPHICS=[
LISTEN=“0.0.0.0”,
PASSWD=“my vnc fancy pass”,
TYPE=“VNC” ]

or even better, ONE can also generate a random pass for you:

GRAPHICS=[
LISTEN=“0.0.0.0”,
RANDOM_PASSWD=“YES”,
TYPE=“VNC” ]

More info here

About the VNC screen size in Sunstone I think that is related with this issue but I’m not sure…

Cheers
Alvaro

Hi @alvaro_simongarcia

Thank you very much for your answer :smile:

We have used both configurations in the template for instantiating the VM but when we access to the VM through the OpenNebula VNC, it does not ask any password, so I am not sure what I am missing on the configuration.

Thanks,
Esteban

ahh… thanks a lot for sending me the issue that you have opened about the VNC screen :slight_smile:

Hi! Have same problem with VNC passwords. Link in Álvaro Simón post is broken. I can’t find any info in docs.

Hi,

Rewinding the time machine and using the docs for ONE released one year earlier recovers the link:

And here is the rendered version:
http://docs.opennebula.org/4.14/user/references/template.html

Update: here is the most recent version:
http://docs.opennebula.org/5.2/operation/references/template.html

Hope this helps,
Anton Todorov

Thanks for answer! Read this doc but can’t see info about where I can see generated password and why oneadmin can connect via VNC to any client VM. Its not secure.