
Answer-first summary for fast verification
Answer: Directly pass the script contents using the CLI, Console, or API., Develop a shutdown script and assign it as the value to a new metadata entry with the key `shutdown-script` in the Cloud Platform Console during the creation of the new virtual machine instance.
To ensure your application shuts down gracefully before the instances are preempted, you should directly pass the script contents using the CLI, Console, or API, and also develop a shutdown script to assign it as the value to a new metadata entry with the key `shutdown-script` in the Cloud Platform Console during the creation of the new virtual machine instance. This approach leverages Google Compute Engine's capability to execute shutdown scripts before preemption. For more details, refer to the [Google Cloud documentation](https://cloud.google.com/compute/docs/shutdownscript).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have set up several preemptible Linux virtual machine instances on Google Compute Engine. To ensure your application shuts down gracefully before the instances are preempted, which two actions should you take?
A
Develop a shutdown script and assign it as the value to a new metadata entry with the key shutdown-script in Deployment Manager.
B
Directly pass the script contents using the CLI, Console, or API.
C
Develop a shutdown script and assign it as the value to a new metadata entry with the key shutdown-script in the Cloud Platform Console during the creation of the new virtual machine instance.
D
Develop a shutdown script and assign it as the value to a new log point entry with the key shutdown-script in the Cloud Platform Console during the creation of the new virtual machine instance.
E
Develop a shutdown script and assign it as the value to a new metadata entry with the key shutdown-script, then utilize the Google Cloud GitHub for additional resources.
No comments yet.