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)