Archive

Archive for the ‘gcloud’ Category

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

December 6, 2018 Leave a comment

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

Categories: gcloud Tags: ,