GOOGLE-PROFESSIONAL-CLOUD-DEVELOPER practice question 27 of 35

Your application is running on Compute Engine and is showing sustained failures for a small number of requests. You have narrowed the cause down to a single Compute Engine instance, but the instance is unresponsive to SSH. What should you do next?

Full set: 265 questions
Answer options
A: Reboot the machine.
B: Enable and check the serial port output. Correct answer
C: Delete the machine and create a new one.
D: Take a snapshot of the disk and attach it to a new machine.
Correct Answer:
B. Enable and check the serial port output.
Explanation

When a Compute Engine instance becomes unresponsive to standard network protocols like SSH, the next logical step is to use an out-of-band diagnostic tool. The serial console provides access to the instance's serial port output, which can reveal critical information such as kernel panic messages, boot failures, or other system-level errors that caused the unresponsiveness. This is a non-destructive method to diagnose the root cause before taking recovery actions like rebooting, which would destroy the in-memory state and valuable diagnostic data.

Why Incorrect

A. Reboot the machine. This is a recovery action, not a diagnostic one. Rebooting destroys the current in-memory state, which may be essential for determining the root cause of the failure.
C. Delete the machine and create a new one. This is the most destructive option. It eliminates the instance and all associated evidence, making it impossible to perform a root cause analysis of the sustained failures.
D. Take a snapshot of the disk and attach it to a new machine. While a valid forensic step for analyzing disk state, checking the serial port provides more immediate, real-time insight into the operating system's current state and why it is unresponsive.

References

1. Google Cloud Documentation - Interacting with the serial console: "The interactive serial console is useful for troubleshooting instances, especially in cases where you can't connect to an instance using SSH... For example, you can use the interactive serial console to diagnose and resolve boot and other low-level issues." (Source: Google Cloud, Compute Engine Documentation, "Interacting with the serial console", Introduction section).

2. Google Cloud Documentation - Troubleshooting VMs: "If you are unable to connect to your instance using SSH or if your instance is unresponsive, you might be able to diagnose and troubleshoot the problem by connecting to the serial console and reviewing its output." (Source: Google Cloud, Compute Engine Documentation, "Troubleshooting VMs", section "Troubleshooting using the serial console").

3. Google Cloud Documentation - Resetting a VM: "Resetting a VM is similar to performing a hard reset on a computer... Resetting a VM wipes the memory content of the machine and returns the VM to its initial state." This confirms that rebooting (a form of reset) destroys diagnostic data. (Source: Google Cloud, Compute Engine Documentation, "Stopping, starting, and resetting a VM", section "Resetting a VM").

Scroll to Top