Soru

Zorluk: OrtaDeploying and Managing Compute Engine Virtual Machines

A DevOps engineer is deploying a specialized compute workload on Google Cloud attached to GPU hardware accelerators. Compute Engine GPU instances do not support live migration. The application configuration requires that if host maintenance occurs, the instance must terminate instead of migrating, and it should not restart automatically if the host experiences an unexpected outage. Which flags must be passed to the `gcloud compute instances create` command to configure this availability behavior correctly?

  1. --on-host-maintenance=TERMINATE --no-automatic-restartCevap
  2. B
    --maintenance-policy=TERMINATE --restart-on-failure=false
  3. C
    --provisioning-model=SPOT --on-host-maintenance=MIGRATE
  4. D
    --on-host-maintenance=MIGRATE --automatic-restart

Cevap

The correct option sets `--on-host-maintenance=TERMINATE` and `--no-automatic-restart`.
Compute Engine instances attached to GPU accelerators cannot undergo live migration. Consequently, their host maintenance policy must be set to `TERMINATE` via `--on-host-maintenance=TERMINATE`. To ensure the VM does not automatically reboot following a host disruption, `--no-automatic-restart` must be specified.

Adım Adım Çözüm

1
Identify host maintenance limitations for GPU instances in Compute Engine
Live migration is not supported for VMs with GPUs; therefore, maintenance behavior must be explicitly configured to terminate the instance.
Compute Engine requires `--on-host-maintenance` to be set to `TERMINATE` whenever GPUs are attached to the VM instance.
2
Determine the parameter flag for disabling automatic restarts upon host failure
Use `--no-automatic-restart` to prevent Google Cloud from restarting the VM automatically after an infrastructure failure.
The default setting is `--automatic-restart`, so explicit inclusion of `--no-automatic-restart` overrides this behavior.
3
Validate the `gcloud` CLI flag names
Combine `--on-host-maintenance=TERMINATE` and `--no-automatic-restart` in the `gcloud compute instances create` command.
This matches official Google Cloud CLI parameter naming conventions.

Anahtar Kavram

Compute Engine Availability Policies and GPU Instance Maintenance Configuration
Bu soruyu puanla