New Question
0

cloudbase-init service seems can only start after user login

asked 2015-03-21 05:50:21 +0300

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

First, sorry for my poor english and thanks for reading this question

I use https://www.cloudbase.it/downloads/Cl...Betax64.msi to install cloudbase-init with default settings in windows server 2012R2. and use http://169.254.169.254/* to get data from openstack. after the first boot, the cloudbase has set value in HKEYLOCALMACHINE\Software\Wow6432Node\Cloudbase Solutions\Cloudbase-Init of Windows registry, then I delete the all Windows registry thing about plugins, set the adminpass value in metadata, reboot the instance, and then cloudbase-init can only do all stuff after user login. I can prove this from the cloudbase-init.log and before login the password can not be changed. after login and all cloudbase-init stuff has done, we just logout and login again, the password has changed.

All those things do in one instance(installation, delete registry value, reboot). In my opinion, by this means of the cloudbase-init service(description as 'Cloud Initialization Service') must be action before login, we can change the password as purpose.

Is there setting wrong of my cloudbase-init or something i may be missing. please tell me, thanks very much.

if you guys need more further information, please tell me then.

this is my cloudbase-init.conf

[DEFAULT]
username=Admin
groups=Administrators
inject_user_password=true
config_drive_raw_hhd=true
config_drive_cdrom=true
config_drive_vfat=true
bsdtar_path=C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\bin\bsdtar.exe
mtools_path=C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\bin\
verbose=true
debug=true
logdir=C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\log\
logfile=cloudbase-init.log
default_log_levels=comtypes=INFO,suds=INFO,iso8601=WARN
logging_serial_port_settings=
mtu_use_dhcp_config=true
ntp_use_dhcp_config=true
local_scripts_path=C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\LocalScripts\
edit retag flag offensive close merge delete

3 answers

Sort by » oldest newest most voted
0

answered 2015-03-22 10:06:49 +0300

maofu.tian gravatar image

updated 2015-03-22 10:09:01 +0300

I has found an intresting thing, when i wait a long time(like 2 minutes or more), the all cloudbase stuff will be done before login. So it is seem that windows login and cloudbase are parallel execute.

Is there some way to make sure logon screen show after all cloudbase stuff has done completely

edit flag offensive delete link more
0

answered 2015-03-31 10:11:46 +0300

maofu.tian gravatar image

I post a quetion in windows forum and get the final answer which helps me. and i think if we want to use this feature, we must don't use cloudbase init as a service, and we should make it as a startup script in GPO which can set by using gpedit.msc. if there is any misunderstand, please tell me. here is the helpful links the guy in windows forum tells me: How to delay logon (Ctrl+Alt-Del) screen until startup script via gpo completes https://social.technet.microsoft.com/Forums/windowsserver/en-US/a4834aba-1157-4528-a535-a6afd90ec843/how-to-delay-logon-ctrlaltdel-screen-until-startup-script-via-gpo-completes?forum=winserverGP What Is Scripts Extension? https://technet.microsoft.com/en-us/library/cc757265(v=ws.10).aspx

edit flag offensive delete link more
0

answered 2015-03-24 15:51:02 +0300

cpopa gravatar image

Hi.

The reason is that cloudbase-init takes a while to load the metadata service, by trying to "load" one of the supported metadata service until the first one responds. As deduced from your configuration file, you are using HTTP service by default, which takes a little time to get loaded, just waiting a couple of extra minutes should be enough.

edit flag offensive delete link more

Comments

Hi, i has notice that. and HttpService is the first one of metadata_services which is seted, the source code indicate that when one of the services is supported, then it will return that service and stop trying other services. so there is no need to set thing else. thanks

maofu.tian gravatar imagemaofu.tian ( 2015-03-25 04:44:22 +0300 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-03-21 05:50:21 +0300

Seen: 14,669 times

Last updated: Mar 24 '15