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 taskBest used forLink to procedure
Pass a startup script directlyScripts up to 256 KB
Linux VMsWindows VMs
Pass a startup script from a local fileScripts up to 256 KB
Linux VMsWindows VMs
Pass a startup script from Cloud StorageScripts greater than 256 KB
Linux VMsWindows VMs
Access metadata from a startup scriptPassing different values to each VM that uses the same script
Linux VMsWindows VMs
Rerun a startup scriptRunning a script without restarting the VM
Linux VMsWindows VMs
View the output from a startup scriptMonitoring the progress of a script
Linux VMsWindows VMs

What's next