nerdexam
Google

PROFESSIONAL-CLOUD-ARCHITECT · Question #9

You have created several preemptible Linux virtual machine instances using Google Compute Engine. You want to properly shut down your application before the virtual machines are preempted. What…

The correct answer is C. Create a shutdown script and use it as the value for a new metadata entry with the key shutdown-. Running Shutdown Scripts: Create and run shutdown scripts that execute commands right before an instance is terminated or restarted, on a best-effort basis. This is useful if you rely on automated scripts to start up and shut down instances, allowing instances time to clean up…

Submitted by omar99· Mar 30, 2026Managing and provisioning cloud solution infrastructure

Question

You have created several preemptible Linux virtual machine instances using Google Compute Engine. You want to properly shut down your application before the virtual machines are preempted. What should you do?

Options

  • ACreate a shutdown script named k99.shutdown in the /etc/rc.6.d/ directory.
  • BCreate a shutdown script registered as a xinetd service in Linux and configure a Stackdnver
  • CCreate a shutdown script and use it as the value for a new metadata entry with the key shutdown-
  • DCreate a shutdown script, registered as a xinetd service in Linux, and use the gcloud compute

How the community answered

(53 responses)
  • A
    2% (1)
  • B
    6% (3)
  • C
    89% (47)
  • D
    4% (2)

Explanation

Running Shutdown Scripts: Create and run shutdown scripts that execute commands right before an instance is terminated or restarted, on a best-effort basis. This is useful if you rely on automated scripts to start up and shut down instances, allowing instances time to clean up or perform tasks, such as exporting logs, or syncing with other systems. https://cloud.google.com/compute/docs/shutdownscript To setup Shutdown Scripts, go to GCP console and follow the steps: Compute Engine -> VM instance -> Create Instance -> (Expand) Management, disks, networking, Enter the key "shutdown-script" and proper value

Topics

#preemptible VMs#shutdown scripts#instance metadata#Compute Engine

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-ARCHITECT Practice