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,

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:

PASSWD=“my vnc fancy pass”,

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


More info here

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


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.


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.


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

And here is the rendered version:

Update: here is the most recent version:

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.