I'm working on a RHEL Blueprint where I am using the Custom Properties ‘Linux.ExternalScript.Name’, ‘Linux.ExternalScript.LocationType’, and ‘Linux.ExternalScript.Path’ to execute a script named ‘post_deploy.sh’ that is stored locally on the Template VM. You can see that the permissions are set so that all users can read and execute (note, the following screenshot is from a failed deployment VM and not the actual template. I’m showing this just to point out which script I’m referring to):
The “CustomizeOS” stage is failing with error, “Failure executing script ‘40_external_script.sh’ and no other detail.
I’ve dug around at several other logs on the failed VM to see if there’s more verbose info in any of them, but I’ve had no luck. I have no idea why this part is failing. Assuming I used the wrong value for the script path, I’ve tried changing the value of the Linux.ExternalScript.Path to simply ‘/post-deploy.sh’ rather than ‘/root/post_deploy.sh’, but no luck there either.
I tried manually running the script on the VM and saw the following error:
So then I looked at the ‘getprop.py’ script to see what it was doing:
So, the ‘40_external_script.sh’ and ‘getprop.py’ scripts are part of the Linux vRA Agent and since there’s an import error “No module named bag”, I’m thinking the Agent is messed up, but I’d like to see some better log info to help validate my assumption.
Any suggestions on how to troubleshoot this further?
Thank you all!