-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The administrator account password cannot be injected when creating a virtual machine #158
Comments
Hello @yule-sun, Please check the current capabilities implemented in cloudbase-init regarding to user-data in cloud-config format: https://cloudbase-init.readthedocs.io/en/latest/userdata.html In your case, as you provided the key
I suggest using the Thank you. |
Thank you very much for your answer. I tried to modify the two configuration files of cloud-base and changed user=administrator. As a result, after the newly created virtual machine, the password of the Administrator account was reset to a random password. I urgently want to know the reason for this. Can you help analyze it? |
Hello, If the username has been changed to To implement the feature, changes are needed in the https://github.com/cloudbase/cloudbase-init/tree/master/cloudbaseinit/plugins/common/userdataplugins/cloudconfigplugins, to have the Can you please share the full config-drive contents from the Ovirt environment, to see how this feature can be implemented? Thanks you. |
Thank you very much for your reply. I created a new virtual machine. Before the virtual machine IP address took effect, I logged into the server and was prompted to change the Administrator password for the first login. However, after I logged in, the password of the Administrator account was reset to a random password. I want to know why this happened? |
I don't know where to modify the user_data.json file because it is automatically generated when the computer boots. I also can't find a place to modify the chpasswd module. How should I set it up next to inject a password into the Administrator? |
Hello @yule-sun, According to https://www.ovirt.org/develop/release-management/features/virt/cloud-init-integration.html, there is no UI integration for the Thanks. |
I installed cloudbase-init 1.1.6 on Windows in an ovirt virtual environment and packaged it into a template. When I used this templateto create a new virtual machine, I configured the administrator password. The content of the virtual machine's configdirve directory config-2\openstack\latest\user_data.json is as follows.
#cloud-config
output:
all: '>> /var/log/cloud-init-output.log'
password: Idpbg123456.
disable_root: 0
runcmd:
["NoCloud", "ConfigDrive"]'' >> /etc/cloud/cloud.cfg'
timezone: Asia/Shanghai
ssh_deletekeys: 'false'
ssh_pwauth: true
chpasswd:
expire: false
user: administrator
However, after the virtual machine is started, I need to log in for the first time to set the administrator's password. It has not been changed to the password I set myself.
Below is the startup log file. Can you help analyze the reason why the administrator password injection failed?
cloudbase-init.txt
The text was updated successfully, but these errors were encountered: