For a GCP VM (RHEL-7) I have configured (added to custom metadata section on GCP console under startup-script key) scripts like:
echo "Welcome"
During the VM restart the scripts seems not triggered.
When I SSH to the VM and run
sudo google_metadata_script_runner startup
In logs I have the following output:
GCEMetadataScripts[11176]: 2021/01/12 19:10:10 GCEMetadataScripts: Starting startup scripts (version 20200706.00).
GCEMetadataScripts[11176]: 2021/01/12 19:10:10 GCEMetadataScripts: Found startup-script in metadata. GCEMetadataScripts[11176]: 2021/01/12 19:10:10
GCEMetadataScripts: startup-script: /bin/bash: /tmp/metadata-scripts171057037/startup-script: Permission denied
GCEMetadataScripts[11176]: 2021/01/12 19:10:10 GCEMetadataScripts: startup-script exit status 126
GCEMetadataScripts[11176]: 2021/01/12 19:10:10 GCEMetadataScripts: Finished running startup scripts.
Does anyone have any idea how to fix that?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…