cloudbase / windows-imaging-tools

Tools to automate the creation of a Windows image for OpenStack, supporting KVM, Hyper-V, ESXi and more.
Apache License 2.0
670 stars 227 forks source link

Cloudbase-init Account #330

Closed T0schi closed 4 years ago

T0schi commented 4 years ago

Hello, After the update of the imaging tools (downloaded end of October) i found a change in the properties of the Cloudbase-init Service. In deployed Win Server OS the Cloudbase-init Service has changed from a specific account to Local System account.

Before image

After image

I have found an entry here, but i haven´t found the place were i can switch this value. We have a usecase from developer side for the Cloudbase-init user.

Was this change performed within the automatic download of the installer during the image creation or where can i switch back to the specific account? image

Thank you for your help.

ader1990 commented 4 years ago

Hello @T0schi,

The behaviour should not have changed between patches, so I think it is a imaging tools config issue. Make sure that the configuration file has the cloudbase_init_use_local_system set to False or it does not have it at all. The default behaviour is to create a special user named cloudbase-init and use it:

[cloudbase_init]
cloudbase_init_use_local_system=False

This is the config entry definition: https://github.com/cloudbase/windows-openstack-imaging-tools/blob/master/Config.psm1#L150

Let me know if this was the case for you.

Thank you, Adrian Vladu

T0schi commented 4 years ago

Hello @ader1990 that are mine outputs from Config File of the image (Server 2019 e.g) image

and Config.psm1 @{"Name" = "cloudbase_init_use_local_system"; "GroupName" = "cloudbase_init"; "AsBoolean" = $true; "DefaultValue" = $false; "Description" = "If set, the Cloudbase-Init service will be run under Local System account. By default, a user named cloudbase-init with admin rights is created and used."},

I did no changes on this parts.

ader1990 commented 4 years ago

I understand, can you share the config file that you use so that I can try to reproduce the issue?

T0schi commented 4 years ago

Here it is

2019stdV_Q4.zip

ader1990 commented 4 years ago

@T0schi I found the issue and there is a regression on a previous feature, that is fixed by pull request https://github.com/cloudbase/windows-openstack-imaging-tools/pull/333. Can you verify that the issue is fixed by the PR?

Thank you, Adrian Vladu

T0schi commented 4 years ago

Thank you for the reply, i will test it next week and let you know the result.

T0schi commented 4 years ago

Sorry i forgot to post that the issue is fixed for both Server 2016 and Server 2019. Thank you

ader1990 commented 4 years ago

@T0schi, thank you for the feedback.