Thank you Alireza!
I tested it and it is working!
Best regards,
Jordan
-----Original Message-----
From: Yordan Kostov <[email protected]>
Sent: Wednesday, May 12, 2021 1:17 PM
To: [email protected]
Subject: RE: Centos 7.9 - cloud-init password reset?
[X] This message came from outside your organization
Thank you Alireza,
I am currently reconfiguring the template from scratch and will test!
Best regards,
Jordan
-----Original Message-----
From: Alireza Eskandari <[email protected]>
Sent: Tuesday, May 11, 2021 5:09 PM
To: [email protected]
Subject: Re: Centos 7.9 - cloud-init password reset?
[X] This message came from outside your organization
Hi
You should check log files in /run/cloud-init directory for the root cause.
If cloud-init cannot find the datasource, it won't run.
The better way to configure datasource in cloud-init is using ds-identify.cfg
file Delete "/etc/cloud/cloud.cfg.d/99_cloudstack.cfg" and create
"/etc/cloud/ds-identify.cfg" file with this content:
datasource: ConfigDrive, CloudStack
Then check output of this command:
DEBUG_LEVEL=2 DI_LOG=stderr /usr/lib/cloud-init/ds-identify --force
Unfortunately cloud-init is poorly documented and you should do some try and
error to fix it.
Take a look at this link:
https://urldefense.com/v3/__https://cloudinit.readthedocs.io/en/latest/topics/faq.html__;!!A6UyJA!2vfkFVGQOoMM0mDg1l-3C6bstn_Yp1e6L5bcnqYmIww2wWMz3EgdTU6-DlC5Z-6zLeBde_X0gZxc$
On Tue, May 11, 2021 at 7:52 AM Yordan Kostov <[email protected]> wrote:
> Hey everyone,
>
> I try to use cloud-init for password reset but for
> some reason it does not work. I thought it is out of the box ☹. Here
> is my
> config:
>
> == Centos 7.9 minimal
>
> yum -y install cloud-init cloud-utils-growpart systemctl enable
> cloud-init
>
> echo "datasource:
> CloudStack: {}
> None: {}
> datasource_list:
> CloudStack" > /etc/cloud/cloud.cfg.d/99_cloudstack.cfg
>
>
> echo "system_info:
> default_user:
> name: root
> disable_root: 0
> ssh_pwauth: 1" > /etc/cloud/cloud.cfg.d/80_root.cfg
>
> First and foremost cloud-init does not run at all. There is noting in
> the logs /var/logs/cloud-init.log When launched manual via cloud-init
> init, logs say it is all successful but root password is not changed.
>
> Not sure If I do something wrong but everyplace I do read says it
> should be working without pretty much complications.
> Do I do something wrong?
>
> Regards,
> Jordan
>