Hi Jerry,
Could you check the file `/etc/cloudstack/vmpassword.json` in the VR whether
the password has been updated? It shows as { "IP": "password" }
Also could you provide the logs ?
Thanks,
David
________________________________
From: li jerry <[email protected]>
Sent: Sunday, August 30, 2020 1:12 PM
To: [email protected] <[email protected]>
Subject: How to reset password using cloud-init in cloudstack
Hi All
We tried to replace the cloud-set-guest-password script with cloud-init in
CentOS.
l The VM is deployed through the template, and the password takes effect
l Reset VM password via CloudStack, failed (cannot log in with new password)
Does anyone know how to solve it?
Here is the operation procedure:
l Cloud-init is installed in guest VM and cloudstack data source is configured;
l Convert VM to template (enable password)
l Deploy VM for new template;
l Use the password ssh returned by cloudstack to log in to the VM, and it is
successful
The above test proves that cloud-init works well
Next, I test the vm resetpassword:
l Shut down VM
l reset password
l Start VM
Failed to login VM with new password
Login VM successfully with old password
Description password reset function failed
VM cloud-init log output:
helpers.py [DEBUG]: config-set-passwords already ran (freq=once-per-instance)
Can the set passwords module be executed every time it is restarted?
(I have implemented the reset password function using cloudbase-init in Windows)
[email protected]
www.shapeblue.com
3 London Bridge Street, 3rd floor, News Building, London SE1 9SGUK
@shapeblue