New Question
0

UserData Not Executing

asked 2020-09-21 18:02:42 +0200

jrove gravatar image

I am configuring a Windows 2019 image with Cloubase-Init, and the UserData section does not execute. Here is my cloudbase-init.conf file:

[DEFAULT]
username=Administrator
groups=Administrators
injectuserpassword=true
configdriverawhhd=true
config
drivecdrom=true
bsdtar
path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\bsdtar.exe
mtoolspath=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\
verbose=true
debug=true
logdir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\
logfile=cloudbase-init.log
default
loglevels=comtypes=INFO,suds=INFO,iso8601=WARN
mtu
usedhcpconfig=true
ntpusedhcpconfig=true
local
scriptspath=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\LocalScripts\
metadata
services=
plugins=cloudbaseinit.plugins.common.userdata.UserDataPlugin
allowreboot=false
stop
serviceonexit=false

The UserData I am trying to execute is very basic:

cloudConfig: |
#cloud-config
write_files:
content: testing cloudbase-init
path: c:\test.txt

When the system reboots, it goes through the Sysprep process successfully. The UserData does not execute, and I do not see any mention of it even trying in the logs.

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2020-10-01 18:20:27 +0200

jrove gravatar image

Thank you for the reply Adrian. It actually ended up being the VM not having a CDROM drive attached.

edit flag offensive delete link more
0

answered 2020-09-29 22:53:31 +0200

avladu gravatar image

Hello,

You need to set the desired metadata service that cloudbase-init should use:

metadata_services=<desired_metadata_service1>,<desired_metadata_service_2>

You can find the supported metadata services here:

https://cloudbase-init.readthedocs.io...

Thank you,
Adrian Vladu

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2020-09-21 18:02:42 +0200

Seen: 115 times

Last updated: Oct 01