You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Loth <lo...@linuxdigital.net> on 2022/10/11 16:18:17 UTC

Injecting SSH Keys Manually

Hello All,

I'm attempting to get a docker container working with
cloudstack-management and it seems to skip over injecting keys to the
SystemVM image (downloads to secondary storage just fine). How can I
accomplish this step manually?
I'm currently getting this error on the agents when SSVM's are
starting for the first time;

Failed to scp files to system VM due to, /root/.ssh/id_rsa.cloud (No
such file or directory)

Thanks for any and all help!

Re: Injecting SSH Keys Manually

Posted by Wei ZHOU <us...@gmail.com>.
Hi Tyler,

Great. Can you create a pull request on github ?

-Wei


On Thu, 13 Oct 2022 at 13:04, Tyler Wilson <ku...@linuxdigital.net> wrote:

> Hello Wei,
>
> This is in 4.17. I was able to get around it by modifying
> updateKeyPairs() and adding a check for the docker env in
> ConfigurationServerImpl.java since docker runs as the root user, this
> will be prematurely returned if its not fixed;
>
>         Path p = Paths.get("/.dockerenv");
>         Boolean docker = Files.exists(p);
> ...
>         if (!username.equalsIgnoreCase("cloud") && !devel && !docker) {
>
>
> On Wed, Oct 12, 2022 at 3:56 PM Wei ZHOU <us...@gmail.com> wrote:
> >
> > Hi,
> >
> > Which cloudstack version do you use ? and what's the host ?
> >
> > -Wei
> >
> >
> > On Wed, 12 Oct 2022 at 15:06, Loth <lo...@linuxdigital.net> wrote:
> >
> > > Hello All,
> > >
> > > I'm attempting to get a docker container working with
> > > cloudstack-management and it seems to skip over injecting keys to the
> > > SystemVM image (downloads to secondary storage just fine). How can I
> > > accomplish this step manually?
> > > I'm currently getting this error on the agents when SSVM's are
> > > starting for the first time;
> > >
> > > Failed to scp files to system VM due to, /root/.ssh/id_rsa.cloud (No
> > > such file or directory)
> > >
> > > Thanks for any and all help!
> > >
>

Re: Injecting SSH Keys Manually

Posted by Tyler Wilson <ku...@linuxdigital.net>.
Hello Wei,

This is in 4.17. I was able to get around it by modifying
updateKeyPairs() and adding a check for the docker env in
ConfigurationServerImpl.java since docker runs as the root user, this
will be prematurely returned if its not fixed;

        Path p = Paths.get("/.dockerenv");
        Boolean docker = Files.exists(p);
...
        if (!username.equalsIgnoreCase("cloud") && !devel && !docker) {


On Wed, Oct 12, 2022 at 3:56 PM Wei ZHOU <us...@gmail.com> wrote:
>
> Hi,
>
> Which cloudstack version do you use ? and what's the host ?
>
> -Wei
>
>
> On Wed, 12 Oct 2022 at 15:06, Loth <lo...@linuxdigital.net> wrote:
>
> > Hello All,
> >
> > I'm attempting to get a docker container working with
> > cloudstack-management and it seems to skip over injecting keys to the
> > SystemVM image (downloads to secondary storage just fine). How can I
> > accomplish this step manually?
> > I'm currently getting this error on the agents when SSVM's are
> > starting for the first time;
> >
> > Failed to scp files to system VM due to, /root/.ssh/id_rsa.cloud (No
> > such file or directory)
> >
> > Thanks for any and all help!
> >

Re: Injecting SSH Keys Manually

Posted by Wei ZHOU <us...@gmail.com>.
Hi,

Which cloudstack version do you use ? and what's the host ?

-Wei


On Wed, 12 Oct 2022 at 15:06, Loth <lo...@linuxdigital.net> wrote:

> Hello All,
>
> I'm attempting to get a docker container working with
> cloudstack-management and it seems to skip over injecting keys to the
> SystemVM image (downloads to secondary storage just fine). How can I
> accomplish this step manually?
> I'm currently getting this error on the agents when SSVM's are
> starting for the first time;
>
> Failed to scp files to system VM due to, /root/.ssh/id_rsa.cloud (No
> such file or directory)
>
> Thanks for any and all help!
>