Fail in configuring cloudbase-init with configdrive service

asked 2022-02-06 14:58:02 +0200

this post is marked as community wiki

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

Hello everyone!

I installed cloudbaseinit v1.1.2 on windows10 and configured my cloudbase-init.conf file like below:

[DEFAULT] username=Administrator groups=Administrators injectuserpassword=true bsdtarpath=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\bsdtar.exe mtoolspath=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\ verbose=true debug=false renameadminuser=true logdir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\ logfile=cloudbase-init.log defaultloglevels=comtypes=INFO,suds=INFO,iso8601=WARN loggingserialportsettings= mtuusedhcpconfig=true ntpusedhcpconfig=true firstlogonbehaviour=no localscriptspath=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\LocalScripts\ metadataservices=cloudbaseinit.metadata.services.nocloudservice.NoCloudConfigDriveService,cloudbaseinit.metadata.services.configdrive.ConfigDriveService plugins=cloudbaseinit.plugins.common.networkconfig.NetworkConfigPlugin,cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin,cloudbaseinit.plugins.windows.createuser.CreateUserPlugin,cloudbaseinit.plugins.common.setuserpassword.SetUserPasswordPlugin,cloudbaseinit.plugins.common.sshpublickeys.SetUserSSHPublicKeysPlugin,cloudbaseinit.plugins.common.mtu.MTUPlugin allowreboot=true stopserviceonexit=false

During the automatic windows installation with autounattend.xml file, I didn't create any local user and and I kept giong with Administrator user.

/user-data:

cloud-config

users: - name: Administrator passwd: imamreza groups: Administrators inactive: False

/meta-data:

instance-id: 0000892c-e497-45a8-a24d-509ca79c6999 hostname: wintest

/config-drive:

version: 1 config: - type: physical name: interface0 mac_address: "$MAC"
subnets: - type: dhcp

When I mounted these three files together in order to change Administrator credentials, The password that I specified in user-data file is not working and the old Administrator user password didn't work too.

I can't access to my loggs for troubleshooting because my password lost. Also I should use nocloud or configdrive metadata services in my custom use case Where I had mistake?

edit retag flag offensive close merge delete