Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
4.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...