Hi Guys I've been trying to create a base Windows image to be used in openstack. I'm providing the user_metadata via config_drive and the following are my configurations:|
> [DEFAULT]
> username=Administrator
> groups=Administrators
> inject_user_password=true
> config_drive_raw_hhd=true
> config_drive_cdrom=false
> config_drive_vfat=true
> bsdtar_path=C:\Program Files\CloudbaseSolutions\Cloudbase-Init\bin\bsdtar.exe
> mtools_path=C:\Program Files\CloudbaseSolutions\Cloudbase-Init\bin\
> verbose=true
> debug=true
> logdir=C:\Program Files\CloudbaseSolutions\Cloudbase-Init\log\
> logfile=cloudbase-init-unattend.log
> default_log_levels=comtypes=INFO,suds=INFO,iso8601=WARN,requests=WARN
> logging_serial_port_settings=COM1,115200,N,8
> mtu_use_dhcp_config=true
> ntp_use_dhcp_config=true
> local_scripts_path=C:\ProgramFiles\Cloudbase\Solutions\Cloudbase-Init\LocalScripts\metadata_services=cloudbaseinit.metadata.services.configdrive.ConfigDriveService,cloudbaseinit.metadata.services.httpservice.HttpService,cloudbaseinit.metadata.services.ec2service.EC2Service,cloudbaseinit.metadata.services.maasservice.MaaSHttpService
> plugins=cloudbaseinit.plugins.common.mtu.MTUPlugin,cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin,cloudbaseinit.plugins.common.setuserpassword.SetUserPasswordPlugin
> allow_reboot=false
> stop_service_on_exit=true
> check_latest_version=false
> first_logon_behaviour=no
I was applying at this point the Sysprep part with specific OOBE configurations on the autounattend.xml file for Sysprep at the end of the configuration of the OOBE configurations to avoid user interaction and leave cloudbaseinit to do all the magic.
true true
Since this didn't work I've decided at the end to go with the default autounnatend configurations on CloudBase-init. So these are the main tests and results (behavior on the image at first boot)
On default configurations Windows for cloudbase-init autounattend.xml and confs for the user Administrator keep asking for password:
https://ibb.co/TvPCq54
On default configurations with first_logon_behaviour enabled as documentation mentioned to be "no" to not ask the customers to change the password on first boot
https://cloudbase-init.readthedocs.io/en/latest/plugins.html#setting-password-main
Default autounatted
plugin=cloudbaseinit.plugins.common.setuserpassword.SetUserPasswordPlugin
first_logon_behaviour=clear_text_injected_only
On password test-3
> Default autounatted
Added:
> plugin=cloudbaseinit.plugins.common.setuserpassword.SetUserPasswordPlugin
>> first_logon_behaviour=no
https://ibb.co/fSLZXZy
https://ibb.co/7zjm4DM
NOTE 1: All passwords are correctly generated and passed via config drive.
NOTE 2: This is working for linux images build with clod-init.
NOTE 3: For Windows before attempting to set a password using the password injection I'm able to see the config drive as a separate drive with all the latest user_metada including the same password retrieved by openstack during the creation of the servers.
I was checking as well the code mentioned on this previous question:
The previous question on mids of 2019
https://ask.cloudbase.it/question/3064/password-not-reading-from-configdrive/?answer=3065#post-id-3065
Review
https://review.opendev.org/#/c/379354/
↧