
Answer-first summary for fast verification
Answer: gcloud compute instances create preempt --preemptible --no-boot-disk-auto-delete
The correct answer is **A** because creating a preemptible instance requires the `--preemptible` flag, and to ensure the disk contents are not deleted upon instance termination, the `--no-boot-disk-auto-delete` flag must be included. This setup allows the disk contents to be reused if the VM is preempted. - **Option B** is incorrect due to the wrong parameter for disk retention. - **Option C** is incorrect as it lacks the necessary flag to prevent disk deletion upon termination. - **Option D** is incorrect because it does not specify the instance as preemptible.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You are setting up a preemptible VM instance named 'preempt' for temporary use as scratch space. To ensure the disk contents remain available for reuse after the VM is preempted, which gcloud command should you use?
A
gcloud compute instances create preempt --preemptible --no-boot-disk-auto-delete
B
gcloud compute instances create preempt --preemptible --boot-disk-auto-delete=no
C
gcloud compute instances create preempt --preemptible
D
gcloud compute instances create preempt --no-auto-delete