About startup scripts


A startup script is a file that contains commands that run when a virtual machine (VM) instance boots. Compute Engine provides support for running startup scripts on Linux VMs and Windows VMs.

The following table contains links to documentation that describes how to use startup scripts.

Startup script task Best used for Link to procedure
Pass a startup script directly Scripts up to 256 KB
Linux VMs Windows VMs
Pass a startup script from a local file Scripts up to 256 KB
Linux VMs Windows VMs
Pass a startup script from Cloud Storage Scripts greater than 256 KB
Linux VMs Windows VMs
Access metadata from a startup script Passing different values to each VM that uses the same script
Linux VMs Windows VMs
Rerun a startup script Running a script without restarting the VM
Linux VMs Windows VMs
View the output from a startup script Monitoring the progress of a script
Linux VMs Windows VMs

What's next