Courseiva
mediumMultiple ChoiceObjective-mapped

Google ACE Practice Question: Refer to the exhibit

Exhibit

Output of `gcloud compute instances list` in Cloud Shell:
Listed 0 items.
The user expects to see a VM they just created via the Console.

Refer to the exhibit. A user runs `gcloud compute instances list` in Cloud Shell and gets the output 'Listed 0 items.' The user expects to see the VM they just created via the Console. What is the most likely cause?

⚠ Common exam trap

Google Cloud often tests the distinction between project-level scope and regional scope, trapping candidates who assume region mismatch is the cause when the real issue is the Cloud Shell being configured to a different project.

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

The Cloud Shell is in a different project

The `gcloud compute instances list` command lists VM instances in the currently configured project (set via `gcloud config set project`). If the Cloud Shell is pointing to a different project than the one where the VM was created via the Console, the command will return 'Listed 0 items' even though the VM exists. This is the most likely cause because the user expects to see the VM but the command is scoped to a different project context.

Answer analysis

Option-by-option breakdown

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

  • The VM was created in a different region

    Why it's wrong here

    The VM was created in a different region. The `gcloud compute instances list` command returns instances across all regions by default; there is no regional scope unless you explicitly filter with `--filter=zone:...` or use `--zones`. Therefore, a VM in another region would still appear in the default output. This option is incorrect because region mismatch does not cause an empty list.

  • The Cloud Shell is in a different project

    Why this is correct

    The Cloud Shell is in a different project. Cloud Shell operates using the project configured in its gcloud settings, which is often the 'Cloud Shell' project or the last project set via `gcloud config set project`, and this may differ from the project you are viewing in the Google Cloud Console. When you run `gcloud compute instances list` in Cloud Shell, it queries only the currently configured project, not the Console-selected project. Thus, if the VM exists in the Console project but not in the Cloud Shell's configured project, the list will be empty.

  • The VM is stopping

    Why it's wrong here

    The VM is stopping. A VM in the 'STOPPING' or even 'TERMINATED' state is still an existing instance and appears in the output of `gcloud compute instances list`. The list includes all instances regardless of their lifecycle state, unless you filter them out. Therefore, a stopping VM would not cause an empty list; it would simply show a status of 'STOPPING'.

  • The user does not have compute.instances.list permission

    Why it's wrong here

    The user does not have compute.instances.list permission. If the user lacked the `compute.instances.list` permission, the `gcloud compute instances list` command would fail with a permission denied error (e.g., HTTP 403), not silently return an empty list. An empty list means the request succeeded and returned zero results, which occurs when no instances exist in the queried project or the project is misconfigured. This option is incorrect because a permission issue produces an error, not an empty list.

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.