0
0
GCPcloud~10 mins

Why Compute Engine provides VM flexibility in GCP - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the machine type for a VM instance.

GCP
machine_type = "zones/us-central1-a/machineTypes/[1]"
Drag options to blanks, or click blank then click option'
An1-standard-1
Bstandard-1
Cvm-standard-1
Dtype-n1-standard-1
Attempts:
3 left
💡 Hint
Common Mistakes
Using incomplete or incorrect machine type names.
Omitting the 'n1-' prefix.
2fill in blank
medium

Complete the code to create a custom VM with specific CPU and memory.

GCP
custom_machine = f"custom-[1]"  # CPUs and memory in MB
Drag options to blanks, or click blank then click option'
A4-8192
B4,8192
C4_8192
D4x8192
Attempts:
3 left
💡 Hint
Common Mistakes
Using commas or other separators instead of dashes.
Confusing memory units.
3fill in blank
hard

Fix the error in the code to set the number of CPUs for a custom VM.

GCP
custom_cpu = int([1])  # Number of CPUs as integer
Drag options to blanks, or click blank then click option'
A'four'
B4.0
C4
D"4"
Attempts:
3 left
💡 Hint
Common Mistakes
Passing float values to int() causing errors.
Using non-numeric strings.
4fill in blank
hard

Fill both blanks to create a VM instance with a custom machine type and zone.

GCP
instance_config = {
  "machineType": "zones/[1]/machineTypes/custom-4-8192",
  "zone": "[2]"
}
Drag options to blanks, or click blank then click option'
Aus-central1-a
Beurope-west1-b
Casia-east1-c
Dus-west1-b
Attempts:
3 left
💡 Hint
Common Mistakes
Using different zones in machineType and zone fields.
Using invalid zone names.
5fill in blank
hard

Fill all three blanks to define a VM instance with custom CPU, memory, and zone.

GCP
vm_instance = {
  "machineType": "zones/[1]/machineTypes/custom-[2]-[3]",
  "name": "custom-vm-1"
}
Drag options to blanks, or click blank then click option'
Aus-east1-b
B6
C12288
Dus-west1-a
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing zone names or using invalid zones.
Using non-numeric CPU or memory values.