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.
To stop a VM, use the Google Cloud console, the gcloud CLI, or the Compute Engine API. In the Google Cloud console, go to the VM instances page. Select one or more VMs that you want to stop. Click Stop.
You might want to stop a VM for several reasons: You no longer need the VM but want the resources that are attached to the VM—such as its internal IPs, MAC address, and persistent disk. You don't need to preserve the guest OS memory, device state, or application state.
In the vSphere vCenter, select the virtual machine. Right-click the VM and select Migrate for Google Compute Engine Operations > Restart.
A stopped instance does not incur charges, but all of the resources that are attached to the instance will still be charged. For example, you are charged for persistent disks and external IP addresses according to the price sheet, even if an instance is stopped.
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.
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