New Question

Revision history [back]

Windows password injection on windows based in openstack

Hi Guys I've been trying to create a base Windows image to be used in openstack. I'm providing the usermetadata via configdrive and the following are my configurations:|

> [DEFAULT]
> 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
> 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.

<skipmachineoobe>true</skipmachineoobe> <skipuseroobe>true</skipuseroobe>

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 firstlogonbehaviour 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

firstlogonbehaviour=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:

Review https://review.opendev.org/#/c/379354/

Windows password injection on windows based in openstack

Hi Guys I've been trying to create a base Windows image to be used in openstack. I'm providing the usermetadata via configdrive and the following are my configurations:|

> [DEFAULT]
> 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
> 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.

<skipmachineoobe>true</skipmachineoobe> <skipuseroobe>true</skipuseroobe>

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 firstlogonbehaviour 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

firstlogonbehaviour=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 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: