To improve reliability, ensure that Google Cloud Compute Engine service restarts automatically your virtual machine instances when they are terminated due to non-user initiated reasons such as maintenance events, hardware, and software failures.
The Automatic Restart feature configures the virtual machine restart behavior when an instance crashes or it is terminated by the system. When the feature is enabled, Google Cloud Compute Engine restarts the instance if this crashes or it is terminated. This behavior does not affect any terminations initiated by the user, for example, when the instance is taken offline through a user action, such as calling sudo shutdown.
Audit
To determine if automatic restart is enabled for your virtual machine instances, perform the following actions:
Remediation / Resolution
To enable automatic restart for your production Google Cloud virtual machine (VM) instances, perform the following actions:
References
- Google Cloud Platform (GCP) Documentation
- Virtual machine instances
- Automatic restart
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud compute instances list
- gcloud compute instances describe
- gcloud compute instances set-scheduling