0
0
GCPcloud~20 mins

Creating a VM instance in GCP - Practice Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
VM Instance Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
Choosing the right machine type for a VM instance

You want to create a VM instance on Google Cloud Platform that will run a small web server with low traffic. Which machine type should you select to optimize cost without sacrificing necessary performance?

An1-ultramem-40 (40 vCPU, 961 GB RAM)
Bn1-standard-1 (1 vCPU, 3.75 GB RAM)
Cn1-highmem-2 (2 vCPU, 13 GB RAM)
Dn1-highcpu-4 (4 vCPU, 3.6 GB RAM)
Attempts:
2 left
💡 Hint

Think about the minimum resources needed for a low-traffic web server and cost efficiency.

Configuration
intermediate
2:00remaining
Specifying the boot disk image for a VM instance

You want to create a VM instance using the latest Debian 11 image from Google Cloud. Which of the following gcloud CLI commands correctly specifies the boot disk image?

Agcloud compute instances create my-vm --image-family=debian-11 --image-project=debian-cloud
Bgcloud compute instances create my-vm --image=debian-11 --image-project=debian-cloud
Cgcloud compute instances create my-vm --image-family=debian-10 --image-project=debian-cloud
Dgcloud compute instances create my-vm --image-family=debian-11
Attempts:
2 left
💡 Hint

Use the image family to get the latest image version automatically.

security
advanced
2:00remaining
Configuring firewall rules for VM instance access

You have created a VM instance that hosts a web application on port 8080. Which firewall rule configuration will allow external users to access the application securely?

AAllow egress TCP traffic on port 8080 to 0.0.0.0/0
BAllow ingress TCP traffic on port 22 from 0.0.0.0/0
CAllow ingress TCP traffic on port 8080 from 0.0.0.0/0
DDeny ingress TCP traffic on port 8080 from 0.0.0.0/0
Attempts:
2 left
💡 Hint

Think about which direction and port need to be open for users to reach your web app.

service_behavior
advanced
2:00remaining
Understanding VM instance startup behavior with startup scripts

You add a startup script to your VM instance metadata to install software on boot. What will happen if the script contains a command that fails?

AThe VM instance will continue booting, but the failed command will not complete.
BThe VM instance will fail to start and remain in a stopped state.
CThe VM instance will reboot automatically until the script succeeds.
DThe VM instance will ignore the startup script entirely.
Attempts:
2 left
💡 Hint

Consider how startup scripts run during boot and their impact on the VM state.

Best Practice
expert
3:00remaining
Designing VM instance deployment for high availability

You need to deploy a critical application on VM instances in Google Cloud that must remain available even if a zone fails. Which architecture best meets this requirement?

ADeploy multiple VM instances in a single zone behind a load balancer.
BDeploy VM instances in multiple projects to increase availability.
CDeploy a single VM instance with a large machine type in one zone.
DDeploy VM instances in multiple zones within a region behind a regional load balancer.
Attempts:
2 left
💡 Hint

Think about how to avoid a single zone failure affecting your application.