

Sudipta Deb
Founder of Technical Potpourri, Co-Founder of Shrey Tech, Enterprise Cloud Architect
Understanding of Google Cloud Virtual Machine's Life Cycle is very important as it helps you to understand what action is allowed at what level. So in this blog post, I am going to explain the entire lifecycle of Google Ccloud's Virtual Machine.
Picture
The form you have selected does not exist.

Provisioning
When you define all the properrties of an instance and click Create, the instance entres into providioning state. Here the resource such as CPU, memory, disks are being reseved, but instance is not running.
Staging
Instance moves to staging state where resources have been acquired and the instance is prepared for launch.
This is the stage where IP addresses are being assigned to VM, booting up the system imge, and booting up the system.
Running
This is the stage where the VM is actually running. Here it will go through pre-configured startup scripts and enable SSH or RDP access. From here you can do multiple stuffs like - migrate your live virtiual machine to another host in the same zone instead of requiring your instance to rebooted.
While you instance is running, it can move your VM todifferent zone, take snapshot, export the system image or reconfigure metadata.
Stopping
Some actions on Virtual Machine needs the VM to be stopped. When VM enters into this state, it will go through pre-configured shutdown scripts and end in the Terminated state.
Terminated
From this state, you can either restart which will bring the VM back to provisioning state or you can delete it.
Repairing
When VM encounters some sort of problem, it will enter into Repaiting state for maintenance work. During this time, VM is unusuable. There will be no charge when VM is in repair. If repair is successful, VM will return to RUnning state.
Suspending / Suspended
When you suspend the VM, it enters into this state first before moving into Suspended state. You can then resume or delete the VM.
Methods Used in Lifecycle
Below is the summary of all the methods being used in the Virtual Machine's life cycle.
| Method Names | State |
| reset | remains running |
| restart | terminated -> running |
| reboot | running -> running |
| stop | running -> terminated |
| shutdown | running -> terminated |
| delete | running -> N/A |
Disclaimer
This article is not endorsed by Salesforce, Google, or any other company in any way. I shared my knowledge on this topic in this blog post. Please always refer to Official Documentation for the latest information.



0 Comments