New Question
0

LocalScript Execution

asked 2020-11-12 06:58:59 +0200

mui18 gravatar image

Unable to run local scripts on windows VM.

Config File

[DEFAULT]

# What user to create and in which group(s) to be put.

username=svctechopsauto groups=Administrators injectuserpassword=false #### # Use password from the metadata (not random).

# Which devices to inspect for a possible configuration drive (metadata).

configdriverawhhd=true configdrive_cdrom=true

# Path to tar implementation from Ubuntu.

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

# Logging debugging level.

verbose=true debug=true

# Where to store logs.

logdir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\ logfile=cloudbase-init-unattend.log defaultloglevels=comtypes=INFO,suds=INFO,iso8601=WARN loggingserialport_settings=

# Enable MTU and NTP plugins.

mtuusedhcpconfig=true ntpusedhcpconfig=true

# Where are located the user supplied scripts for execution.

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

# Services that will be tested for loading until one of them succeeds.

metadata_services=cloudbaseinit.metadata.services.base.EmptyMetadataService, cloudbaseinit.metadata.services.azureservice.AzureService, cloudbaseinit.metadata.services.configdrive.ConfigDriveService, cloudbaseinit.metadata.services.httpservice.HttpService, cloudbaseinit.metadata.services.maasservice.MaaSHttpService

# What plugins to execute.

plugins=cloudbaseinit.plugins.common.localscripts.LocalScriptsPlugin, cloudbaseinit.plugins.common.userdata.UserDataPlugin

# Miscellaneous.

allowreboot=true #### # allow the service to reboot the system stopserviceonexit=false

LocalScript #ps1 file

#ps1_sysnative

# setup logging

Start-Transcript -path C:\cloudbase-init-firstboot.log -Append -force

write-output "NVIDIA customization started" Write-Output "Hello World!"

# stop logging

stop-transcript

# exit with return code 1001

exit 1001

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2020-11-12 21:19:58 +0200

avladu gravatar image

Hello,

Can you share the cloudbase-init logs, if possible?

From the config file, LocalScriptsPlugin should be executed, but the UserDataPlugin will never be executed as the EmptyMetadataService does not provide userdata.

edit flag offensive delete link more

Comments

There are no logs present in the location specified in the config folder. A 13 MB log file is generated while installing cloudbase-init.

mui18 gravatar imagemui18 ( 2020-11-13 21:27:03 +0200 )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

Stats

Asked: 2020-11-12 06:58:59 +0200

Seen: 20 times

Last updated: Nov 12