SSH_PUBLIC_KEY empty with docker-machine

Hi all,
I have an extrange issue. It happens only in one of my environments (I have two). With the same OS (centos7), opennebula version (6.0.3) and using the same template.
In one of them when I create a docker as follows:

docker-machine create --driver opennebula --opennebula-template-id 9 test

everything goes ok. The template has included the public key in context and it appears in the SSH_PUBLIC_KEY in the vm created.
But in the other, the SSH_PUBLIC_KEY appears completely empty.

If I create the same vm from inside (with sunstone), using the same template, everything goes fine.

Any idea about what is happening?


Versions of the related components and OS (frontend, hypervisors, VMs):

Steps to reproduce:

Current results:

Expected results:

I have fixed it myself. The user that executes the docker-machine tool needs to have its public key in the auth (in Sunstone). If not, even if the public key is already defined in the template, it is removed and appears in blank. Adding the key in the user, the template is filled with its key and works.


1 Like