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

VM Termination and Deletion

How to safely terminate instances, termination protection, and cleanup of associated resources like volumes.

VM Termination and Deletion

What you'll learn: How to properly remove virtual machines from your cloud environment and clean up associated resources to avoid unnecessary costs.

Understanding VM Termination

When you terminate a VM, you're permanently deleting it from your cloud environment. Unlike stopping (which preserves the instance for later restart), termination destroys the VM and cannot be undone.

Think of it like the difference between closing your laptop (stop) versus throwing it in the recycling bin (terminate). Once terminated, the VM is gone forever.

Termination Protection

Cloud providers offer termination protection as a safety feature—a lock that prevents accidental deletion of critical VMs. Before you can terminate a protected instance, you must first disable this protection setting.

This is similar to child safety locks on medicine bottles: an intentional extra step to prevent costly mistakes.

What Gets Deleted

When you terminate a VM, several things happen automatically:

  • The VM instance itself is destroyed
  • The root volume (boot disk) is typically deleted by default
  • Any temporary or ephemeral storage is permanently lost
  • Network configurations like security group associations are removed

What You Must Clean Up Manually

However, some resources persist after termination and continue incurring costs:

  • Additional storage volumes attached to the VM (unless configured to auto-delete)
  • Elastic IP addresses or reserved public IPs
  • Snapshots you created for backup
  • Network interfaces you explicitly created

Always review and delete these orphaned resources after terminating VMs to avoid surprise charges.

Key Takeaway: Termination permanently destroys a VM and some associated resources, but you must manually clean up additional volumes, IPs, and snapshots to fully eliminate costs and maintain a tidy cloud environment.