Search code examples
ubuntuvirtual-machinegcloudgoogle-cloud-sdk

How to reset VM of Google Cloud SDK?


I am having a problem of creating database in Google Cloud SDK using provided scripts in a course and would like to reset the VM (Ubuntu 20.04 LTS). However, on the Google Cloud SDK documentation, I only found how to uninstall SDK from computer, which I believe is different from resetting the VM (which is on the cloud). Are these the same thing? If not, how can I reset the VM? I also have direct SSH connection with VM, can I reset using SSH?


Solution

  • Official documentation provided a detailed explanation of how to reset a VM:

    https://cloud.google.com/compute/docs/instances/stop-start-instance#resetting_an_instance

    You can either use the web console, or use the following command:

    gcloud compute instances reset VM_NAME