Courseiva
Ensuring Successful Operation of a Cloud SolutionmediumMultiple ChoiceObjective-mapped

Google ACE Practice Question: Ensuring Successful Operation of a Cloud Solution

You have a Compute Engine VM instance that is currently running. You need to resize it to a different machine type. What must you do first?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Stop the instance, then use gcloud compute instances set-machine-type, then start the instance.

Changing the machine type requires the VM to be in a stopped state. You must stop the instance, change the machine type, then start it.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Stop the instance, then use gcloud compute instances set-machine-type, then start the instance.

    Why this is correct

    Stopping the instance transitions it to the TERMINATED state, which releases the underlying host resources while preserving the boot disk, metadata, and attachment of persistent disks. The `gcloud compute instances set-machine-type` command can then change the vCPU and memory allocation, and after that you start the instance. This is the correct workflow because Compute Engine rejects machine type changes on running instances.

  • Use gcloud compute instances update --machine-type while the instance is running.

    Why it's wrong here

    The `gcloud compute instances update` command does not accept a `--machine-type` flag; the dedicated command for resizing is `gcloud compute instances set-machine-type`. Even if a valid update command existed, a running VM cannot have its CPU or memory allocation reallocated because the hypervisor must stop the instance to change its resource reservation. Therefore this invocation is invalid both syntactically and by lifecycle constraints.

  • Detach all disks, change machine type, then reattach disks.

    Why it's wrong here

    Persistent disks are attached at the storage layer and are completely independent of the instance's machine type, so detaching them adds no value for a resize. Detaching disks requires the instance to be stopped or detached carefully, consumes extra time, and introduces the risk of attaching the wrong disks or losing the original boot disk configuration. The direct `set-machine-type` operation preserves disk attachment and is the intended mechanism.

  • Create a snapshot of the disk and use it to create a new instance with the desired machine type.

    Why it's wrong here

    Creating a snapshot and building a new VM is a drastic workaround that replicates the entire instance but does not resize it in place. The replacement instance will receive a new instance ID and IP address and may lack the original tags, IAM bindings, and instance metadata, breaking dependent services. Snapshots are designed for backup and migration, not for a simple vCPU/memory change; stopping and modifying the original VM is far simpler and safer.

About these practice questions

Courseiva writes every ACE question from scratch — 769 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.