New Question
0

user data basics - return code 1?

asked 2020-07-08 17:40:30 +0200

minervaman gravatar image

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

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2020-07-10 11:41:14 +0200

minervaman gravatar image

updated 2020-07-10 14:00:43 +0200

UPDATE: Set execution policy to unrestricted on template and now working

sorry cannot attach yet :( i set the config meta service as OVF as this deployment is for on prem vcenter

2020-07-09 06:20:28.612 1084 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-09 06:20:34.331 1084 DEBUG cloudbaseinit.osutils.windows [-] Checking if service exists: cloudbase-init checkserviceexists C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\osutils\windows.py:1092 2020-07-09 06:20:34.331 1084 DEBUG cloudbaseinit.osutils.windows [-] Getting service username: cloudbase-init getserviceusername C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\osutils\windows.py:1225 2020-07-09 06:20:34.347 1084 INFO cloudbaseinit.osutils.windows [-] Skipping password reset, service running as a built-in account: LocalSystem 2020-07-09 06:20:34.347 1084 INFO cloudbaseinit.init [-] Cloudbase-Init version: 1.1.2 2020-07-09 06:20:35.347 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 4 2020-07-09 06:20:36.362 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 4 2020-07-09 06:20:37.362 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:38.362 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:39.362 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:40.378 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:41.394 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:42.409 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:43.425 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:44.425 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:45.441 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:46.441 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:47.441 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:48.441 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:49.441 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:50.443 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:51.456 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:52.456 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:53.456 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:54.456 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:55.472 1084 INFO cloudbaseinit.osutils.windows [-] Waiting for sysprep completion. GeneralizationState: 3 2020-07-09 06:20:56 ... (more)

edit flag offensive delete link more

Comments

great to see it working. Can you elaborate please the steps you followed, so that I can add them in the cloudbase-init documentation?

avladu gravatar imageavladu ( 2020-07-10 14:13:07 +0200 )edit
0

answered 2020-07-09 15:40:29 +0200

avladu gravatar image

Hello,

There might be an issue with finding the userdata in the first place.

Can you please detail what metadata service was loaded and what is the structure of the metadata source?

All the cloudbase-init logs are welcome too.

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-07-08 17:40:30 +0200

Seen: 983 times

Last updated: Jul 10 '20