Course contentsShow
← Cloud and Infrastructure
Lesson 83 of 2,9892. Compute FoundationsFree lesson

Starting and Stopping VMs

How to start and stop instances, differences between stop and terminate, and data persistence implications.

Starting and Stopping VMs

What you'll learn: How to control VM lifecycle through start and stop operations, and why this matters for your data and costs.

The Core Concept

Starting and stopping VMs is like turning your computer on and off—but with important cloud-specific implications. When you start a VM, it boots up from a stopped state, restoring its previous configuration. When you stop a VM, it shuts down gracefully, preserving its attached storage and configuration for later restart.

Stop vs. Terminate: A Critical Difference

Stopping a VM is temporary—think of it as shutting down your laptop. The VM's root volume and any attached storage remain intact. You can start it again later, and everything will be as you left it. You typically only pay for storage while stopped, not compute time.

Terminating a VM is permanent deletion—like throwing away your computer. Unless you've configured your storage to persist independently, the root volume is destroyed along with all data on it. There's no "restart" button for terminated instances.

Data Persistence Implications

  • Root volume: Persists through stop/start cycles but may be deleted on termination (depending on configuration)
  • Attached volumes: Usually persist through both stop and termination unless explicitly deleted
  • Instance metadata: Preserved when stopped, lost when terminated
  • IP addresses: Public IPs may change after stop/start; private IPs typically remain the same

Why This Matters

Stopping unused VMs during off-hours dramatically reduces costs since you're not charged for compute time. However, accidentally terminating instead of stopping can result in data loss if backups aren't in place.

Key Takeaway: Stopping VMs preserves your configuration and data while reducing costs; terminating permanently deletes resources. Always verify which operation you're performing to avoid unintended data loss.