easyMultiple ChoiceObjective-mapped
Google ACE Practice Question: A DevOps team notices that a Compute Engine…
A DevOps team notices that a Compute Engine instance running a critical application has been terminated unexpectedly. The team wants to ensure the instance restarts automatically if it stops. Which configuration should they use?
⚠ Common exam trap
Google Cloud often tests the distinction between 'Automatic restart' (for infrastructure failures) and managed instance group autohealing (for application-level health), leading candidates to confuse the two or incorrectly choose a startup script as a restart mechanism.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Enable the 'Automatic restart' flag on the instance template.
Enabling the 'Automatic restart' flag on the instance template ensures that Compute Engine automatically restarts the VM if it terminates due to a non-user-initiated failure (e.g., hardware failure, system crash). This is the native mechanism for automatic recovery without requiring external scripts or manual intervention.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Configure a startup script that checks for termination and restarts the instance.
Why it's wrong here
A startup script executes inside the guest OS when the instance boots, but it cannot monitor for unexpected termination because the instance is no longer running. Moreover, a script running inside a VM does not have IAM permissions or API access to call `compute.instances.start` or re-create the VM, and it would not execute after a forced termination. The correct solution is a platform-level lifecycle flag, not an in-guest script.
- ✗
Set the 'On host maintenance' policy to 'Migrate VM instance'.
Why it's wrong here
The 'On host maintenance' policy controls what happens when Google performs a routine maintenance event, such as a live migration of the instance to a different host. Setting it to 'Migrate VM instance' only triggers a seamless migration during these planned host operations, not a restart after an unexpected termination (e.g., hardware failure or crash). Automatic restart is a separate, independent setting in the instance template that governs recovery from unplanned termination.
- ✓
Enable the 'Automatic restart' flag on the instance template.
Why this is correct
The 'Automatic restart' flag, when enabled on the instance template, instructs Compute Engine to automatically restart the VM if it terminates for a non-user-initiated reason, such as a system crash or a hardware failure. This is a managed platform feature that works at the hypervisor level, independent of the guest OS. It is the correct configuration to recover a single Compute Engine instance from unexpected termination.
- ✗
Create a firewall rule to allow health check traffic from the load balancer.
Why it's wrong here
A firewall rule that permits health check traffic from the load balancer only allows the load balancer to reach the instance for health probing; it does not alter the instance's lifecycle behavior. Health checks can mark an instance as unhealthy and detach it from the backend service, but they never restart or recreate an instance. Restarting a terminated instance requires the automatic restart flag or a managed instance group's autohealing policy, not a network-level rule.
Go deeper
Related to this question
Learn chapter
Google Compute Engine
Key term
Instance template
An instance template is a reusable configuration blueprint that defines the virtual machine settings, such as machine type, boot disk image, and network, for creating identical VM instances in Google Cloud Platform.
Key term
Compute Engine
Compute Engine is Google Cloud's Infrastructure-as-a-Service (IaaS) offering that lets you create and run virtual machines on Google's infrastructure.
About these practice questions
This ACE question is part of Courseiva's 769-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.