Medium1 markMultiple Choice

GCP ACE · Question 19 · Domain 3.1: Deploying and implementing Compute Engine resources

You need to quickly launch a new Compute Engine virtual machine named 'web-server-01' in the us-central1-a zone using the e2-medium machine type.

Which gcloud command should you use?

Answer options:

A.

gcloud compute create instance web-server-01 --zone=us-central1-a --type=e2-medium

B.

gcloud compute instances start web-server-01 --zone=us-central1-a --machine-type=e2-medium

C.

gcloud compute instances create web-server-01 --zone=us-central1-a --machine-type=e2-medium

D.

gcloud instances create web-server-01 --zone=us-central1-a --machine-type=e2-medium

How to approach this question

Remember the standard gcloud structure: gcloud [service] [resource] [action].

Full Answer

C.gcloud compute instances create web-server-01 --zone=us-central1-a --machine-type=e2-medium✓ Correct
gcloud compute instances create web-server-01 --zone=us-central1-a --machine-type=e2-medium
The correct command to create a VM is `gcloud compute instances create [INSTANCE_NAME]`. You append flags like `--zone` and `--machine-type` to specify configuration details.

Common mistakes

Forgetting the 'compute' keyword or confusing 'create' with 'start'.

Practice the full GCP Associate Cloud Engineer Practice Exam 3

50 questions · hints · full answers · grading

More questions from this exam