0
votes

I am trying to stop google compute engine from

https://console.developers.google.com/project/myapp/apiui/api

As soon as I click the off button next to google compute engine, I see the message "Disabling Google Compute Engine...".

The message never goes away and Google Compute Engine is still on.

I'm using Chrome on Windows.

I'm trying to restart the GCE service because I keep getting: Error: API rate limit exceeded when I try to run gcutil listinstances after setting up my instance for the first time.

Can someone help with either the service restart issue or the API rate limit exceeded issue?

2

2 Answers

0
votes

If you'd like to restart your instance, there are two ways to do this. For the first one, go to your VM Instances page (https://console.developers.google.com/project/{project-id}/compute/instances) Be sure to fill in your project-id, or simply go to the page from the console.

Then click on the instance you'd like to restart, and on that page, there's a simple "reboot" button. If this still isn't working, try the next option.

The next option is to login to your instance and do sudo reboot. My guess is this will succeed and not fix your problem, but it will either succeed of tell you why it didn't. Alternatively you can use sudo poweroff and use the console to restart your instance.

0
votes

You have 4 options to stop your instance.

If you would like to stop your instance using Google Cloud Platform Console, you may use this guide:

  1. Go to the VM instances page in the GCP Console.
  2. Select one or more instances that you want to stop.
  3. At the top of the VM instances page, click Stop.

To stop your instance using gcloud tool, please follow this procedure.

  1. Open your Google Cloud Shell in GCP.
  2. Use the instances stop command and specify one or more instances that you want to stop.

$ gcloud compute instances stop your-instance1 your-instance-2

In the API, construct a POST request to stop an instance.

POST https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/instances/example-instance/stop

To stop your instance through the OS for Linux and Windows.

  1. In the GCP Console, go to the VM Instances page.
  2. In the list of virtual machine instances, click SSH in the row of the instance that you want to connect to.
  3. Use the sudo shutdown -h now or sudo poweroff commands. Execute one of these commands while you are logged into the virtual machine:

$ sudo shutdown -h now

$ sudo poweroff

You can reboot a Windows instance, similar to sudo reboot above, using the Start menu. In the Start menu, click on the arrow next to Log off and click Restart.