Search code examples
google-cloud-platformgcloud

ERROR: (gcloud.compute.instances.delete) Could not fetch resource: The resource not found


I would like to delete a secondary VM, spun up from the master VM already deleted, on Google Cloud Console. I tried several times from the console, anyway, by reloading the page, I can see it again loading.

From the console, it is NOT possible to:

  • Start--> You can't start this VM instance because it's not stopped
  • Stop--> You can't stop this VM instance because it's not running,
    suspended or being repaired.
  • Suspend--> You can't suspend this VM instance because it's not running.
  • Reset--> You can't reset this VM instance because it's not running.

I tried also to delete the browser cache, and from another browser, with the same issue persisting.

I also tried typing on the Cloud Shell Terminal:

gcloud --quiet compute instances delete projects/PROJECT-NAME/zones/europe-west4-b/instances/nf-f29c7405-169839-353a2991-c482-4fbb0-group0-0-0m4g 

But still, I get the error:

ERROR: (gcloud.compute.instances.delete) Could not fetch resource:
 - The resource 'projects/PROJECT-NAME/zones/europe-west4-b/instances/nf-f29c7405-169839-353a2991-c482-4fbb0-group0-0-0m4g' was not found

Has anyone else experienced the same error?


Solution

  • You need to use the --zone parameter in your command.

    gcloud compute instances delete instance_name --zone=europe-west4-b
    

    See this document.