Get Your CertGoogle Cloud Associate Cloud EngineerPlayCompete
‹ All Google Cloud Associate Cloud Engineer questions

GCP Associate Cloud Engineer Practice Question 48: GPU VM Maintenance Policy

Google Cloud Associate Cloud Engineer · Test 5 · question 8 of 10

Compute Engine Deploymentmedium

You run gcloud compute instances create for a standard (not Spot) N1 VM with an NVIDIA T4 GPU attached, using default options. The command fails with an error stating that the instance cannot be created because GPU instances do not support live migration.

What should you change?

Select one answer
Show answer and explanation

Answer:

  • C. Add --maintenance-policy=TERMINATE so that the VM stops instead of live migrating during host maintenance

By default, VMs use the host maintenance policy MIGRATE, which live migrates the VM to another host during maintenance. VMs with attached GPUs (N1 with GPUs, for example) cannot be live migrated, so you must set the policy to TERMINATE, which stops the VM during a host maintenance event (with automatic restart possible if configured).

Option A would make the VM a Spot VM, which changes the pricing model and makes it interruptible, and the stem requires a standard on-demand VM. Option B does not address the error, which is about the maintenance policy and not about the size. Option D controls restarts after failures and does not change the maintenance policy, so the creation error remains.

Reference: Host maintenance overview

Practice Test 5 ›

Study guides for Google Cloud Associate Cloud Engineer