user data basics - return code 1?
i am testing vra 8 and as guest customization is longer available i am looking to leverage cloudbase init to provde initial guest customization service is installed and runs under local system ]now looking to run some native ps commands on guest but it fails but with not sure if i can going about this correctly or not. any advice?
cloudConfig: | #ps1 Install-WindowsFeature -Name Web-Server -IncludeManagementTools new-item -Type Directory -Name staging -Path 'c:' -Force new-item -Type Directory -Name staging -Path '$env:windir' -Force
2020-07-07 06:54:58.913 2984 INFO cloudbaseinit.init [-] Executing plugin 'UserDataPlugin' 2020-07-07 06:54:58.913 2984 DEBUG cloudbaseinit.plugins.common.userdata [-] User data content length: 80 execute C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\plugins\common\userdata.py:50 2020-07-07 06:54:58.913 2984 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.utils.templateengine.jinja2template.Jinja2TemplateEngine' load_class C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2020-07-07 06:54:59.819 2984 DEBUG cloudbaseinit.utils.classloader [-] Loading class
'cloudbaseinit.osutils.windows.WindowsUtils' loadclass C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2020-07-07 06:55:12.397 2984 DEBUG cloudbaseinit.plugins.common.userdatautils [-] Userdata stdout: b'' executeuserdatascript C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\plugins\common\userdatautils.py:93 2020-07-07 06:55:12.397 2984 DEBUG cloudbaseinit.plugins.common.userdatautils [-] Userdata stderr: b'' executeuserdatascript C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\plugins\common\userdatautils.py:94 2020-07-07 06:55:12.397 2984 INFO cloudbaseinit.plugins.common.userdatautils [-] Userdata script ended with return code: 1 2020-07-07 06:55:12.413 2984 INFO cloudbaseinit.init [-] Plugins execution done 2020-07-07 06:55:12.413 2984 INFO cloudbaseinit.init [-] Stopping Cloudbase-Init service