5
votes

I have a Google Compute Engine VM Instance that runs Ubuntu 16.04.

I stopped the instance more than an hour ago but it still hasn't stopped. It says "Unknown error." on notification panel.

I can't do any action on VM right now, because the process is still ongoing. It doesn't let me to stop, start, reset, delete, or access.

How can I force stop the instance? I need to access to the disk attached to VM, but I can't even create snapshot before stopping the VM.

Edit:
Instance stopped after 1.5 hours being stuck at "stopping" state. But I still couldn't find a way to force stop an instance.

1
Did you try something like this "sudo shutdown -h now" & "sudo poweroff"? - Isanka Wijerathne
Maybe your Internet Connection isn't working properly. Check it. You can also stop your VM instance via gcloud CLI. - Kanishk Kumar Gupta
@IsankaWijerathne I couldn't access to vm. - burakcalik
@KanishkKumarGupta It is not about the internet connection. The vm is stuck at "stopping" state, gcloud cli also can't force stop afaik. - burakcalik
sincerely hoping my VM has same issue, havent backed up my code on AIPlatform and VM just decided to go nuts. Per recommendation online have stopped it, however its taking its time trying to stop - El_1988

1 Answers

4
votes

You can take a look into Stopping or Deleting an Instance this article or you can use the following gcloud command line tool in order to stop the instance temporarily so you can come back to it at a later time:

$ gcloud compute instances stop INSTANCE_NAMES [INSTANCE_NAMES …]

If the gcloud command line unable to stop the instance then, you can take a look into activity log or stackdriver logs which will help you to debug further. Also at the same time I would recommend running the gcloud command along with flag ‘--verbosity=debug’. Either the activity logs, stackdriver logs or gcloud command line with ‘--verbosity=debug’ flag will give you a better output which will help you to review from what point it is failing.