how to stop compute engine instance without terminating the instance?

google-compute-engine

Solution

My question is, how do i just shut the VM down without terminating it? is that an option?

Unfortunately, you can't. AWS EC2 is the exception when it comes to preserving instances on shutdown. Not even OpenStack providers support that out of the box. The workaround is to create an image based on the snapshot you want and then create a new instance based on that image.

Problem

I am playing with Google Compute Engine with debian as the source image. I understand that I will be charged by the hour for as long as the instance is running, regardless whether i ssh in or not. The shutdown -h command apparently put the instance in terminated mode, and i would have to create the instance again for next time. My question is, how do i just shut the VM down without terminating it? is that an option? Google Say that : https://developers.google.com/compute/docs/troubleshooting If you shut down your instance using sudo shutdown or sudo poweroff, it is the equivalent of terminating it. There is no way to "freeze" an instance and restart it at a later time. You must recreate your instance if you choose to shut it down. When an instance is shut down from inside, it goes into the TERMINATED state but will still appear in the API (such as when you list instances). To remove it from the list, you must delete the instance explicitly. However, uptime for a TERMINATED instance is not billed.

Original source

Related problems