how to run custom data from windows azure vm through cloudbase-init

asked 2021-09-30 22:35:46 +0200

this post is marked as community wiki

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

i have custom data for windows azure vm as below:

cloud-config

set_hostname: newhostname runcmd: - 'mkdir C:\temp'

and cloudbase-init conf file as below: [DEFAULT] username=Admin 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=true logdir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\ logfile=cloudbase-init-unattend.log defaultloglevels=comtypes=INFO,suds=INFO,iso8601=WARN,requests=WARN

mtuusedhcpconfig=true ntpusedhcpconfig=true localscriptspath=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\LocalScripts\ checklatestversion=false metadataservices=cloudbaseinit.metadata.services.configdrive.ConfigDriveService,cloudbaseinit.metadata.services.httpservice.HttpService,cloudbaseinit.metadata.services.azureservice.AzureService,cloudbaseinit.metadata.services.maasservice.MaaSHttpService plugins=cloudbaseinit.plugins.common.mtu.MTUPlugin, cloudbaseinit.plugins.windows.ntpclient.NTPClientPlugin, cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin, cloudbaseinit.plugins.windows.createuser.CreateUserPlugin, cloudbaseinit.plugins.common.networkconfig.NetworkConfigPlugin, cloudbaseinit.plugins.windows.licensing.WindowsLicensingPlugin, cloudbaseinit.plugins.common.sshpublickeys.SetUserSSHPublicKeysPlugin, cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin, cloudbaseinit.plugins.common.userdata.UserDataPlugin, cloudbaseinit.plugins.common.setuserpassword.SetUserPasswordPlugin, cloudbaseinit.plugins.windows.winrmlistener.ConfigWinRMListenerPlugin, cloudbaseinit.plugins.windows.winrmcertificateauth.ConfigWinRMCertificateAuthPlugin, cloudbaseinit.plugins.common.localscripts.LocalScriptsPlugin allowreboot=true stopserviceonexit=false processuserdata=true use_eventlog=true

Let me know what need to be done to run custom data in windows azure vm

edit retag flag offensive close merge delete

Comments

2021-10-03 12:11:50.264 2824 ERROR cloudbaseinit.metadata.services.azureservice OVF_ENV_DRIVE_TAG) 2021-10-03 12:11:50.264 2824 ERROR cloudbaseinit.metadata.services.azureservice cloudbaseinit.exception.ItemNotFoundException: No drive containing file E6DA6616-8EC4-48E0-BE93-58CE6ACE3CFB.tag coul

jaihai gravatar imagejaihai ( 2021-10-03 15:14:35 +0200 )edit

2021-10-03 12:11:50.264 2824 ERROR cloudbaseinit.init [-] No metadata service found: cloudbaseinit.exception.MetadataNotFoundException: No available service found 2021-10-03 12:11:50.264 2824 INFO cloudbaseinit.init [-] Plugins execution done

jaihai gravatar imagejaihai ( 2021-10-03 15:15:21 +0200 )edit