DEV Community

Cover image for Part-3: Understand VM Management Tasks - Stop, Start, Suspend, Resume, Delete and Reset in Google Cloud Platform (GCP)
Latchu@DevOps
Latchu@DevOps

Posted on

Part-3: Understand VM Management Tasks - Stop, Start, Suspend, Resume, Delete and Reset in Google Cloud Platform (GCP)

Managing Google Cloud VM instances effectively can save you money and help you optimize resources. Let’s break down what happens when you stop, start, suspend, resume, delete and reset a VM in Google Cloud.

VM-console


🔍 What Do You Lose When You Stop a VM?

When you stop a VM instance

  • The External/Public IP is released
  • On the next start, the VM will be assigned a different Public IP (unless you have a static IP reserved)

📦 What Does the VM Retain?

Even when stopped, your VM will retain

  • Persistent disks (data is safe)
  • Internal IP address
  • MAC address

🛑 When Should You Stop a VM?

Stopping a VM is useful when

  • You want to save costs during idle periods
  • You need to change the VM’s machine type (CPU, memory, etc.)
  • You want to add or remove disks

💰 Billing Considerations

  • Stopped (TERMINATED) VMs are not charged for compute usage
  • You will still be charged for:
Persistent disks
Static external IP addresses (if reserved)
Enter fullscreen mode Exit fullscreen mode

💤 Suspend and Resume a VM

🔹 What Happens When You Suspend a VM?

  • OS memory, device state, and application state are preserved.
  • VM memory is moved from RAM to storage.
  • When resumed, the memory is moved back into RAM, restoring the VM to its previous running state.

🔹 Key Facts

  • You can suspend a VM for up to 60 days before it’s automatically stopped.
  • VMs with more than 120 GB memory cannot be suspended.
  • Most operating systems support suspend/resume; some do not.

🔹 Use Cases

  • Dev & Test environments that don’t run after business hours but need to retain application state.
  • Applications with long initialization times that would be inconvenient to restart from scratch.

🔹 Pricing Considerations

You pay for

  • Storage needed to hold VM memory
  • Persistent disks attached to the VM
  • Any static IPs assigned to the VM

Perform VM Action - Suspend and Resume

  • Go to VM Instances -> demo1-vm -> Actions -> Suspend
  • We should see suspend action is success ☑️
  • Go to VM Instances -> demo1-vm -> Actions -> Start / Resume
  • Exteral IP before and after "suspend and resume" action will vary (Its a Ephemeral IP Address - NOT STATIC)

🔄 Reset and Delete a VM

🔹 Reset VM Instance

  • Works like a hard reset on a physical computer.
  • Wipes memory and resets the VM instantly.
  • No clean shutdown — the guest OS is not given time to stop gracefully.
  • VM remains in RUNNING state during the reset.

Perform VM Action - Reset

  • Go to VM Instances -> demo1-vm -> Actions -> Reset
  • Just memory wipes, any data in system memory will be reset
# Access Webserver Pages
http://<external-ip-of-vm>
Observation:
1. Application should be accessible
Enter fullscreen mode Exit fullscreen mode

🔹 Delete VM Instance

  • Completely removes the VM and associated resources from your project.
  • Use when you no longer need the instance at all.

Top comments (0)