0
0
GCPcloud~10 mins

Machine types and families (E2, N2, C2) in GCP - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Machine types and families (E2, N2, C2)
Choose Machine Family
E2: Cost-effective, general use
N2: Balanced performance
C2: Compute optimized
Select Machine Type
Deploy VM Instance
Start by choosing a machine family based on needs, then select a machine type within that family, and finally deploy the VM instance.
Execution Sample
GCP
gcloud compute instances create my-vm \
  --machine-type=e2-medium \
  --zone=us-central1-a
This command creates a VM instance using the E2 machine family with a medium size in a specific zone.
Process Table
StepActionMachine FamilyMachine TypeResult
1Choose machine familyE2Selected E2 for cost-effective general use
2Select machine typeE2e2-mediumMedium size chosen with 2 vCPUs and 4 GB RAM
3Deploy VME2e2-mediumVM instance created in us-central1-a zone
4EndDeployment complete
💡 VM instance deployed successfully with chosen machine family and type
Status Tracker
VariableStartAfter Step 1After Step 2Final
machine_familynoneE2E2E2
machine_typenonenonee2-mediume2-medium
vm_statusnot creatednot createdcreatedcreated
Key Moments - 2 Insights
Why do we pick a machine family before the machine type?
Because the machine family defines the overall characteristics like cost and performance, and machine types are specific sizes within that family. See execution_table rows 1 and 2.
What happens if you choose a machine type not in the selected family?
The deployment will fail because machine types must belong to the chosen family. This is why step 2 selects a type within the family.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what machine family is selected at step 1?
AC2
BN2
CE2
De2-medium
💡 Hint
Check the 'Machine Family' column in row 1 of the execution_table.
At which step is the VM instance created?
AStep 3
BStep 2
CStep 1
DStep 4
💡 Hint
Look at the 'Result' column for the step where VM status changes to created.
If you change the machine family to N2, what must you also change?
AThe zone
BThe machine type to one in N2 family
CThe VM name
DNothing else
💡 Hint
Refer to key_moments about matching machine type to family.
Concept Snapshot
Machine families group VM types by purpose:
- E2: cost-effective, general use
- N2: balanced performance
- C2: compute optimized
Choose family first, then pick machine type (size).
Deploy VM with chosen type in a zone.
Full Transcript
This lesson shows how to select a machine family and type in Google Cloud Platform. First, you pick a family like E2 for cost savings or C2 for compute power. Then, you choose a machine type within that family, such as e2-medium. Finally, you deploy the VM instance with these settings. The execution table traces these steps, showing the family and type chosen and the VM creation. Key points include matching machine types to families and understanding the purpose of each family. The quiz tests your understanding of these steps and choices.