Google Cloud Professional Cloud Architect — Question 57

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?

Answer options

Correct answer: C

Explanation

The correct answer is C because Google Compute Engine allows you to specify a shutdown script through a metadata entry during the VM instance creation. Option A is incorrect as it does not associate the script with the VM's shutdown process. Option B does not utilize the proper method for shutting down VMs, and option D wrongly suggests using a service URL, which is not necessary for this use case.