Recall & Review
beginner
What is a startup script in Google Cloud Platform (GCP)?
A startup script is a set of commands that automatically run when a virtual machine (VM) instance starts. It helps automate setup tasks like installing software or configuring settings.
Click to reveal answer
beginner
Where do you specify a startup script for a VM in GCP?
You specify a startup script in the VM instance's metadata under the key 'startup-script'. This script runs every time the VM boots.
Click to reveal answer
beginner
Why use startup scripts instead of manual setup on VMs?
Startup scripts automate repetitive tasks, ensure consistency across VMs, save time, and reduce human errors during setup.
Click to reveal answer
intermediate
How can you debug a startup script if it fails on a GCP VM?
Check the serial port output logs of the VM in the GCP Console. Logs often show errors from the startup script to help identify issues.
Click to reveal answer
beginner
What is a common format for startup scripts in GCP VMs?
Startup scripts are usually shell scripts (bash) for Linux VMs or PowerShell scripts for Windows VMs.
Click to reveal answer
Where do you add a startup script for a GCP VM?
✗ Incorrect
Startup scripts are added in the VM's metadata with the key 'startup-script' to run automatically on boot.
What happens when a startup script runs on a VM?
✗ Incorrect
Startup scripts run commands automatically during the VM's boot process to configure or install software.
Which log helps you debug startup script errors on a GCP VM?
✗ Incorrect
Serial port output logs show the VM's boot messages including startup script errors.
What scripting language is commonly used for Linux VM startup scripts?
✗ Incorrect
Bash shell scripts are commonly used for Linux VM startup scripts in GCP.
Why automate VM setup with startup scripts?
✗ Incorrect
Startup scripts automate setup tasks, saving time and ensuring all VMs are configured the same way.
Explain what a startup script is and how it helps automate VM setup in GCP.
Think about what happens automatically when a VM starts.
You got /4 concepts.
Describe how you would troubleshoot a startup script that is not working on a GCP VM.
Where does the VM show boot messages and errors?
You got /4 concepts.