Courseiva
Deploying and Implementing a Cloud SolutionmediumMultiple ChoiceObjective-mapped

Google ACE Deploying and Implementing a Cloud Solution Practice Question

A developer wants to create a Compute Engine instance with the container-optimized OS image in the default network. Which command should they use?

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 --image-family=cos-stable --image-project=cos-cloud

The correct command uses '--image-family=cos-stable' and '--image-project=cos-cloud' to specify the Container-Optimized OS image. Option B uses 'gcloud compute instances create' with the correct flags.

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 --image-family=ubuntu-2004-lts --image-project=ubuntu-os-cloud

    Why it's wrong here

    The command uses the Ubuntu 20.04 LTS image family from the ubuntu-os-cloud project, which is a legitimate gcloud invocation but produces a standard Linux VM, not a Container-Optimized OS (COS) instance. COS is Google's hardened, minimal operating system specifically designed to run Docker containers with a read-only root filesystem and automatic security updates. If the developer's goal is a container-optimized environment, this command fails conceptually even though it would succeed technically.

  • gcloud compute instances create my-instance --image-family=cos-stable --image-project=cos-cloud

    Why this is correct

    This is the correct command because it explicitly selects the 'cos-stable' image family from the 'cos-cloud' project, which yields the latest stable release of Container-Optimized OS. COS is a Google-supported OS with Docker, containerd, and Kubernetes tools preinstalled, optimized for running containerized workloads. Including both --image-family and --image-project ensures that gcloud resolves the family from the proper project, avoiding ambiguity with the default compute project.

  • gcloud compute instances create my-instance --image-family=cos-stable

    Why it's wrong here

    Omitting the --image-project flag is a common mistake; by default, gcloud looks for the image family in the project configured as the current compute project (or the default project set in gcloud config). The 'cos-stable' family lives in the 'cos-cloud' project, not in the user's project, so the command would fail with an error like 'Could not find image: cos-stable' unless that project happens to have a family with that name. This error occurs at image resolution time, before instance creation begins.

  • gcloud compute instances create my-instance --image=cos-stable --image-project=cos-cloud

    Why it's wrong here

    Using --image instead of --image-family incorrectly treats 'cos-stable' as a specific image name rather than a family alias. The --image flag requires an exact image name (e.g., 'cos-stable-125-17-21'), which is version-specific and changes frequently, whereas --image-family allows automatic use of the latest image in that family. Since an image literally named 'cos-stable' does not exist in cos-cloud, gcloud would fail to find it and refuse to create the instance.

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.