Fail in configuring cloudbase-init using configdrive

asked 2022-02-06 14:59:19 +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

bsdtar_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\bsdtar.exe

mtools_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\

verbose=true

debug=false

renameadminuser=true

log_dir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\

log_file=cloudbase-init.log

defaultloglevels=comtypes=INFO,suds=INFO,iso8601=WARN

loggingserialport_settings=

mtuusedhcp_config=true

ntpusedhcp_config=true

firstlogonbehaviour=no

localscriptspath=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\LocalScripts\

metadata_services=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

allow_reboot=true

stopserviceon_exit=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: woody

    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