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.
When it transforms into a green checkmark, your virtual machine is running. At that point, you can tap on "RDP" to connect with your remote desktop session. Again, unless you want to keep your virtual machine running to service clients, be sure to shut it down when you're done so that you minimize the cost.
Suspending an instance differs from stopping an instance in the following ways: Suspended instances preserve the guest OS memory, device state, and application state. Google charges for the storage necessary to save instance memory. You can only suspend an instance for up to 60 days.
I know this thread is a bit old, but the Shutdown/Start
feature has now been introduced in the Developers console and command line, so no need to create snapshots anymore.
Documentation is available here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With