Question

I followed the proper documentation regarding specifying kernel in the command line while bundling the GCE image.

I specified the following:

--preferred_kernel=projects/google/global/kernels/gce-v20130515

The image bundle process works out ok and I get no errors. But when I run the add instance command, I get the following error:

$ gcutil addinstance --image=hareem --kernel=gce-v20130515 mynewinstance --project=my-project
INVALID_FIELD_VALUE: Invalid value for field 'resource.kernels': 'projects/hlabsgce/global/kernels/gce-v20130515'. Resource was not found.
Was it helpful?

Solution

You may need to use the full name for the Kernel here, it looks like gcutil is looking for the Google kernel in your private project:

'projects/hlabsgce/global/kernels/gce-v20130515'

instead of

'projects/google/global/kernels/gce-v20130515'

Try:

gcutil addinstance --image=hareem --kernel=projects/google/global/kernels/gce-v20130515 mynewinstance --project=my-project

gcutil should use the prefered kernel by default though, so you might not even need to supply that parameter.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top