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.
有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top