How to run startup-script in GCP vm's launched using GCP custom image.

535 views
Skip to first unread message

Bhanu Prasad

unread,
Aug 27, 2018, 2:43:33 AM8/27/18
to gce-discussion
I have launched a VM in GCP using a custom image from the GCP console.
I have added a start-up script while launching the VM.

When I login into the VM, I have observed that my start-up script is not executed.

I have gone through the log file and observed the " No start-up script found" message in /var/log/syslog.

Note : Start-up scripts execute successfully for VM's launched using GCP default images.

Can any one help me on how to execute start-up scripts for VM's launched using custom images.

Thanks,
Bhanu Saketi.

Shaiq Muhammad (Google Cloud Support)

unread,
Aug 27, 2018, 2:09:00 PM8/27/18
to gce-discussion
Hello, 

Mostly this type of issue happens when the Guest Environment didn't setup properly for the startup script. I would recommend you to check this article which will help you with the services that should be loaded on Linux instances with working Guest Environments. 

Additionally, if you are using Windows VM then please check this article  which will give you an idea about "instance_setup.ps1"  that helps to run user provided 'specialize' startup script.  

I hope this helps.
Reply all
Reply to author
Forward
0 new messages