Topic 1 Question 32
You have created several pre-emptible 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?
Create a shutdown script named k99.shutdown in the /etc/rc.6.d/ directory
Create a shutdown script registered as a xinetd service in Linux and configure a Stackdriver endpoint check to call the service
Create a shutdown script and use it as the value for a new metadata entry with the key shutdown-script in the Cloud Platform Console when you create the new virtual machine instance
Create a shutdown script, registered as a xinetd service in Linux, and use the gcloud compute instances add-metadata command to specify the service URL as the value for a new metadata entry with the key shutdown-script-url
解説
A startup script, or a shutdown script, is specified through the metadata server, using startup script metadata keys. Reference: https://cloud.google.com/compute/docs/startupscript
ユーザの投票
コメント(17)
- 👍 34Eroc2019/10/25
I have doubts with the answer C because the question states that "You have created the instances" so C works too but the solution cannot apply to the already created instances. D seems correct to me...
Reference: https://cloud.google.com/compute/docs/shutdownscript#apply_a_shutdown_script_to_running_instances
👍 16Gini2020/05/11- 正解だと思う選択肢: C
D is wrong because shutdown-script-URL only accepts GCS urls
👍 3kazob2022/10/14
シャッフルモード