D. The flag disables preemptible; use --preemptible instead
Solution
Step 1: Analyze the preemptible flag usage
The flag --enable-preemptible=false disables preemptible VMs.
Step 2: Correct the flag to enable preemptible
Use --preemptible without false to create preemptible VM.
Final Answer:
The flag disables preemptible; use --preemptible instead -> Option D
Quick Check:
Use --preemptible to enable preemptible VMs [OK]
Hint: Use --preemptible flag alone to enable preemptible VMs [OK]
Common Mistakes:
Using --enable-preemptible=false disables preemptible
Changing machine type instead of flag
Ignoring flag syntax errors
5. A company wants to optimize costs by automatically stopping VMs when not in use during nights and weekends. Which GCP service or strategy best supports this goal?
hard
A. Use Cloud Scheduler to trigger Cloud Functions that stop/start VMs on schedule
B. Manually stop VMs every night using the console
C. Use preemptible VMs only without scheduling
D. Increase VM size to reduce runtime
Solution
Step 1: Identify automation options for VM management
Cloud Scheduler can run tasks on a schedule, and Cloud Functions can execute commands like stopping VMs.
Step 2: Match automation to cost optimization goal
Automating stop/start reduces costs by not running VMs when unused.
Final Answer:
Use Cloud Scheduler to trigger Cloud Functions that stop/start VMs on schedule -> Option A
Quick Check:
Automate VM stop/start with Cloud Scheduler and Functions [OK]
Hint: Automate VM stop/start with Cloud Scheduler and Functions [OK]
Common Mistakes:
Relying on manual stopping which is error-prone
Using preemptible VMs without scheduling
Increasing VM size which raises costs
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.