nerdexam
Google

PROFESSIONAL-CLOUD-NETWORK-ENGINEER · Question #33

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 D. 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 ngozi_ng· Apr 18, 2026Implementing a Google Cloud network

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 registered as a xinetd service in Linux and configure a StackDriver
  • BCreate a shutdown script, registered as a xinetd service in Linux, and use the gcloud compute
  • CCreate a shutdown script named shutdown in the /etc/ directory.
  • DCreate a shutdown script and use it as the value for a new metadata entry with the key shutdown-

How the community answered

(16 responses)
  • B
    6% (1)
  • D
    94% (15)

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#VM Lifecycle Management#Shutdown Scripts#Metadata

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-NETWORK-ENGINEER Practice