Question 826 of 1,000
Deploying and Implementing a Cloud SolutionmediumMultiple ChoiceObjective-mapped

Google ACE gcloud compute instances create Practice Question

This ACE practice question tests your understanding of deploying and implementing a cloud solution. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. A key principle to apply: gcloud compute instances create. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

An engineer needs to create a Compute Engine instance with a specific custom subnet, an Ubuntu 20.04 LTS image, and a 50 GB boot disk. The engineer also wants to run a startup script that installs Apache. Which gcloud command should the engineer use to create this instance?

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

gcloud compute instances create my-instance --machine-type=e2-medium --image-family=ubuntu-2004-lts --image-project=ubuntu-os-cloud --boot-disk-size=50GB --subnet=my-subnet --zone=us-central1-a --metadata startup-script='apt-get update && apt-get install -y apache2'

The correct command is option B. It uses the required flags: --machine-type (not --machine), --image-family=ubuntu-2004-lts, --image-project=ubuntu-os-cloud, --boot-disk-size=50GB, --subnet=my-subnet, and --metadata with the startup script. Option A is incorrect because it uses --machine (invalid) instead of --machine-type. Option C is incorrect because it uses the wrong image family (ubuntu-1804-lts). Option D is incorrect because it uses --image instead of --image-family, which is not recommended for specifying an image family.

Key principle: gcloud compute instances create

Answer analysis

Option-by-option breakdown

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

  • gcloud compute instances create my-instance --machine=e2-medium --image-family=ubuntu-2004-lts --image-project=ubuntu-os-cloud --boot-disk-size=50GB --subnet=my-subnet --zone=us-central1-a --metadata=startup-script='apt-get update && apt-get install -y apache2'

    Why it's wrong here

    Flag --machine is invalid; must be --machine-type.

  • gcloud compute instances create my-instance --machine-type=e2-medium --image-family=ubuntu-2004-lts --image-project=ubuntu-os-cloud --boot-disk-size=50GB --subnet=my-subnet --zone=us-central1-a --metadata startup-script='apt-get update && apt-get install -y apache2'

    Why this is correct

    Correct flags and values.

    Related concept

    gcloud compute instances create

  • gcloud compute instances create my-instance --machine-type=e2-medium --image-family=ubuntu-1804-lts --image-project=ubuntu-os-cloud --boot-disk-size=50GB --subnet=my-subnet --zone=us-central1-a --metadata=startup-script='apt-get update && apt-get install -y apache2'

    Why it's wrong here

    Wrong image family (Ubuntu 18.04 instead of 20.04).

  • gcloud compute instances create my-instance --machine-type=e2-medium --image=ubuntu-2004-lts --image-project=ubuntu-os-cloud --boot-disk-size=50GB --subnet=my-subnet --zone=us-central1-a --metadata startup-script='apt-get update && apt-get install -y apache2'

    Why it's wrong here

    Uses --image instead of --image-family; --image expects an image name, not family.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Many certification questions include familiar terms but test a specific constraint. Read the exact wording before choosing an answer that is generally true but wrong for this case.

Detailed technical explanation

How to think about this question

Treat this as a scenario question. Identify the problem, the constraint, and the best action. Then compare each option against those facts.

KKey Concepts to Remember

  • gcloud compute instances create
  • --machine-type
  • --image-family
  • --metadata startup-script

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

gcloud compute instances create

Real-world example

How this comes up in practice

An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.

Visual reference

192.168.1.0 /24 256 addresses (254 usable) 192.168.1.0 /25 Subnet A 128 addr (126 usable) 192.168.1.128 /25 Subnet B 128 addr (126 usable) Borrowing 1 bit from host portion creates 2 subnets (/25)

What to study next

Got this wrong? Here's your next step.

Review gcloud compute instances create, then practise related ACE questions on the same topic to reinforce the concept.

Related practice questions

Related ACE practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free ACE practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this ACE question test?

Deploying and Implementing a Cloud Solution — This question tests Deploying and Implementing a Cloud Solution — gcloud compute instances create.

What is the correct answer to this question?

The correct answer is: gcloud compute instances create my-instance --machine-type=e2-medium --image-family=ubuntu-2004-lts --image-project=ubuntu-os-cloud --boot-disk-size=50GB --subnet=my-subnet --zone=us-central1-a --metadata startup-script='apt-get update && apt-get install -y apache2' — The correct command is option B. It uses the required flags: --machine-type (not --machine), --image-family=ubuntu-2004-lts, --image-project=ubuntu-os-cloud, --boot-disk-size=50GB, --subnet=my-subnet, and --metadata with the startup script. Option A is incorrect because it uses --machine (invalid) instead of --machine-type. Option C is incorrect because it uses the wrong image family (ubuntu-1804-lts). Option D is incorrect because it uses --image instead of --image-family, which is not recommended for specifying an image family.

What should I do if I get this ACE question wrong?

Review gcloud compute instances create, then practise related ACE questions on the same topic to reinforce the concept.

What is the key concept behind this question?

gcloud compute instances create

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More ACE practice questions

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.