New Question
0

How to start PowerShell script as a part of cloudbase-init process?

asked 2020-02-26 09:07:08 +0200

this post is marked as community wiki

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

I'm beating my head against the wall trying to figure this out. What needs to be done to conf files in order for a PowerShell script to be started as a part of the cloudbase-init process? Which modules and plugins need to be called, and what does the PS script need to look like? I tried to create a script in LocalScripts directory, put #ps1_sysnative at the top, added the localscriptsplugin to plugins called from the conf file, and cloudbase-init didn't even try to execute my script :-(

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2020-02-27 16:06:25 +0200

avladu gravatar image

Hello,

Cloudbase-Init runs the LocalScriptsPlugin depending on the configuration and if the plugin has been already executed. In your case, you might have added the local scripts after the first boot or the metadata service was not loaded correctly.

To better manage this issue and its resolution, can you first open a bug on GitHub https://github.com/cloudbase/cloudbas... ? Please provide the cloudbase-init config file and logs for further debugging the issue.

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-02-26 09:07:08 +0200

Seen: 2,401 times

Last updated: Feb 27 '20