Home > gcloud > Invalid value for field ‘resource.disks[0].initializeParams.sourceImage’

Invalid value for field ‘resource.disks[0].initializeParams.sourceImage’

Problem:
You ran (from https://github.com/kelseyhightower/intro-to-kubernetes-workshop/blob/master/labs/install-gce-client-tools.md)

$ gcloud compute instances create workshop-test \
 --image-project coreos-cloud \
 --image coreos-stable-835-12-0-v20160202 \
 --boot-disk-size 200GB \
 --machine-type n1-standard-1 \
 --can-ip-forward \
 --scopes compute-rw

And get the following error

– Invalid value for field ‘resource.disks[0].initializeParams.sourceImage’: ‘https://www.googleapis.com/compute/v1/projects/coreos-cloud/global/images/coreos-stable-835-12-0-v20160202’. The referenced image resource cannot be found.

Solution:
The image being referenced does not exist. Get the list of images and pick the correct one.

$ gcloud compute images list --uri | less

$ gcloud compute instances create workshop-test \
 --image-project coreos-cloud \
 --image coreos-stable-1911-4-0-v20181127 \
 --boot-disk-size 200GB \
 --machine-type n1-standard-1 \
 --can-ip-forward \
 --scopes compute-rw
Created [https://www.googleapis.com/compute/v1/projects/ktinga-hallway-224527/zones/us-central1-f/instances/workshop-test].
NAME           ZONE           MACHINE_TYPE   PREEMPTIBLE  INTERNAL_IP  EXTERNAL_IP     STATUS
workshop-test  us-central1-f  n1-standard-1               10.128.0.2   35.184.123.230  RUNNING

Source:
https://github.com/docker/machine/issues/3904

Advertisements
Categories: gcloud Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: