Hi Hean,

I had seen a similar behavior with VMs deployed on shared network. The issue 
was that cloud-init first searches for the dhcp leases file, and only if it 
can't find one does cloud-init use the default gateway to reach the metadata 
server.
So, firstly you may want to check for the presence of the dhclient lease file, 
which contains the parameter - 'dhcp-server-identifier' which would correspond 
to the VR IP. If it isn't present, you could try to acquire the lease by 
running ' dhclient -1' and then try resetting the password.


Thanks
Pearl

________________________________
From: Hean Seng <[email protected]>
Sent: Saturday, November 21, 2020 11:31 PM
To: [email protected] <[email protected]>
Subject: Re: Password reset for CentOS 8 Template

Hi

I put the script in /etc/NetworkManager/dispatcher.d , the script run , but
keep say

Found password server IP x.x.x.1 in nmcli output

Sending request to password server at x.x.x.1

Failed to send request to password server at x.x.x.1

Did not need to change password.

the file  /etc/sysconfig/network-scripts/ifcfg-eth0   is exist

this x.x.x.1  is the Gw IP , which is not right, it should get the IP from
VirtualRouter IP .




On Tue, Nov 17, 2020 at 7:49 PM Craig Dunn <[email protected]>
wrote:

> Hey,
>
> I created a Centos 8 template a few months back for our cloudstack 4.11
> install.
>
> I made a few notes on the install, Not sure exactly what issue you were
> having but mine was the script tried to run before network manager had
> finished starting. Notes I made I pasted below, hope it helps
>
> Centos 8 and above has changed the way in which its networking is handled.
> The Network-Scripts has been deprecated and replaced with Network Manager
> which handles all interfaces
>
>
>
> This means that placing the Cloudstack password management script inside
> /etc/init.d errors saying that Network Manager was not started. This is due
> to the fact that the script runs on bootup and runs before Network Manager
> starts so the password does not get changed.
>
>
>
> If you try this you can see the error in /var/log/messages and you run:
>
>
>
> cat messages | grep "password"
>
>
>
> To resolve this we need to get the password change script to run after the
> Network Manager service has started.
>
>
>
> Navigate to /etc/NetworkManager/dispatcher.d
>
>
>
> Create a file called ifup-local
>
>
>
> And paste the script inside the file
>
> Thanks
>

[email protected] 
www.shapeblue.com
3 London Bridge Street,  3rd floor, News Building, London  SE1 9SGUK
@shapeblue
  
 

> On Fri, 13 Nov 2020 at 04:24, Hean Seng <[email protected]> wrote:
>
> > Hi
> >
> > Is there anybody do the template for CentOS 8 before,  i not able to get
> it
> > work for password reset .  either in Script or Cloud-Init.      It is due
> > to CentOS 8 cannot disable NetworkManager, and Cloudstack data source py
> ,
> > keep getting data from  NetworkManager and there  seem not able to get
> the
> > VR ip there.
> >
> > Anybody have experience on CentOS 8 template, pelase share the
> experience .
> >
> >
> > --
> > Regards,
> > Hean Seng
> >
>


--
Regards,
Hean Seng

Reply via email to