
Answer-first summary for fast verification
Answer: Develop a shutdown script and assign it as the value to a new metadata entry with the key 'shutdown-script' via the Cloud Platform Console during the creation of the new virtual machine instance., Craft a shutdown script and set it as the value for a new metadata entry with the key 'shutdown-script' in Deployment Manager.
To ensure your application shuts down properly before the virtual machines are preempted, you should create a shutdown script and use it as the value for a new metadata entry with the key 'shutdown-script' either in the Cloud Platform Console when creating the new instance or in Deployment Manager. This approach is documented in Google's official documentation: [Google Compute Engine shutdown script](https://cloud.google.com/compute/docs/shutdownscript).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You've set up multiple preemptible Linux virtual machine instances on Google Compute Engine and need to ensure your application shuts down gracefully before the instances are preempted. Which two methods should you use?
A
Develop a shutdown script and assign it as the value to a new metadata entry with the key 'shutdown-script' via the Cloud Platform Console during the creation of the new virtual machine instance.
B
Utilize the CLI, Console, or API to directly pass the script's contents.
C
Craft a shutdown script and set it as the value for a new metadata entry with the key 'shutdown-script' in Deployment Manager.
D
Design a shutdown script, assign it as the value to a new metadata entry with the key 'shutdown-script', and then refer to Google Cloud GitHub resources for further steps.
No comments yet.