Troubleshooting: gcloud compute ssh could not fetch instance

Troubleshooting: gcloud compute ssh could not fetch instance 


I create a instance on gcloud compute under project gvm. When I tried to ssh login that instance, I got this error message.
$ gcloud compute ssh instance-1
$ ERROR: (gcloud.compute.ssh) Could not fetch instance:
 - The resource 'projects/gvm/zones/us-west1-a/instances/instance-1' was not found
The reason for this case is instance zone and google cloud compute default zone are different. Command line needs the zone info like this,
gcloud compute --project "gvm" ssh --zone "us-west1-a" "instance-1"
 You can find this info from vm instances page in gcloud console.

Please find more details about setting in google cloud document https://cloud.google.com/compute/docs/gcloud-compute/#configurations 


Comments

Wendy said…
Thank you! This finally solved the issue for me.
Damon Liao said…
Thank you! worked for me
Unknown said…
Thank you really solved my problems !
kyle foley said…
This did not work for me.
ed medication said…
After I originally commented I seem to have clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I receive 4 emails with the exact same comment. There has to be an easy method you are able to remove me from that service? Appreciate it!
slot gacors said…
The best article sir, I hope you are always healthy GBU

agen pulsa terpercaya