Courseiva

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

You have a Compute Engine VM that is running a critical application. You need to change its machine type from n1-standard-4 to n2-standard-8. What is the correct procedure?

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

To change the machine type of a VM, you must stop the instance first, then use the gcloud compute instances set-machine-type command, and finally start the instance again.

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 first moves it to the TERMINATED state, where the underlying vCPU/memory allocation can be changed. The `gcloud compute instances set-machine-type` command only works on a stopped instance, so stopping, changing, then starting is the documented, supported path. This preserves the boot disk, persistent disks, static IP, and all instance metadata.

  • Use gcloud compute instances update --machine-type n2-standard-8 while the instance is running

    Why it's wrong here

    The `gcloud compute instances update` command does not have a `--machine-type` flag; machine type changes are handled by the dedicated `set-machine-type` subcommand. Even if the flag existed, GCP does not allow resizing a running VM's machine type because the instance must be stopped first. Attempting this would result in an error and leave the instance unchanged.

  • Delete the instance and create a new one with the desired machine type

    Why it's wrong here

    Deleting and recreating the instance will work but is needlessly destructive and wasteful. You would have to detach or preserve persistent disks, re-apply metadata, tags, service accounts, and IAM policies, and reassign static IPs. The supported `set-machine-type` workflow accomplishes the same change in minutes without deleting the instance or losing its configuration and state.

  • Use gcloud compute instances resize --machine-type n2-standard-8 without stopping

    Why it's wrong here

    There is no `gcloud compute instances resize` command for VM machine types; `resize` is instead used for managed instance groups or persistent disks. The only way to change a machine type is `gcloud compute instances set-machine-type`, which requires the instance to be stopped first. Running the nonexistent `resize` command against a running instance would fail immediately and perform no change.

About these practice questions

This ACE question is part of Courseiva's 769-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.