GCP Basics · Module 05
Compute Engine – Machine Types, VMs, Disks and Managed Instance Groups
Pick machine families and pricing models, create and connect to VMs safely, manage Persistent Disk, Hyperdisk, snapshots and images, and run fleets of identical VMs with instance templates, managed instance groups and autoscaling.
What you will learn
- Choose a machine family and a pricing model (on-demand, Spot, committed use)
- Create a VM without an external IP and connect with OS Login and IAP
- Choose disk types, resize disks, schedule snapshots and build custom images
- Run regional managed instance groups with autoscaling, autohealing and rolling updates
- Keep VMs available with live migration, regional disks and multi-zone designs
Lessons
- Machine Families and Pricing Models
Machine families trade price for performance; on-demand billing is per second, sustained use and committed use discounts lower steady costs, and Spot VMs are much cheaper but can be stopped at any time.
- Create a VM and Connect: OS Login and IAP
Create VMs from public image families without external IPs, run a startup script, attach a dedicated service account, and connect with OS Login over IAP instead of shared SSH keys.
- Persistent Disk, Hyperdisk, Snapshots and Images
Choose a disk type for performance and cost, grow disks online, protect them with scheduled incremental snapshots, and build custom images and image families for repeatable VMs.
- Instance Templates, Managed Instance Groups and Autoscaling
An instance template describes a VM; a regional managed instance group runs identical VMs across zones with autoscaling, autohealing and rolling updates.
- VM Availability: Zones, Live Migration and Regional Disks
Compute Engine live-migrates most VMs during host maintenance; design for zone failure with regional MIGs and regional disks, and set maintenance and restart policies per VM.