
Answer-first summary for fast verification
Answer: gcloud compute instances create [INSTANCE_NAME] --preemptible --no-boot-disk-auto-delete
The correct answer is to use the `--no-boot-disk-auto-delete` flag with the `gcloud compute instances create` command. This flag disables the automatic deletion of the boot disk when the instance is deleted, which is enabled by default. The other options either use incorrect flags or misunderstand the default behavior of the `--boot-disk-auto-delete` flag. For more details, refer to the [Google Cloud SDK documentation](https://cloud.google.com/sdk/gcloud/reference/compute/instances/create).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
How can you ensure the boot disk of a preemptible instance is persisted for re-use when provisioning it with gcloud compute instances create?
A
gcloud compute instances create [INSTANCE_NAME] --preemptible --no-boot-disk-auto-delete
B
gcloud compute instances create [INSTANCE_NAME] --preemptible --boot-disk-auto-delete=no
C
gcloud compute instances create [INSTANCE_NAME] --no-auto-delete
D
gcloud compute instances create [INSTANCE_NAME] --preemptible. The flag --boot-disk-auto-delete is disabled by default.