0

I'm trying to create and use custom images following this guide and I get an error.

$ gcutil --project=es-cloud addimage elasticsearch-0-90-2 gs://esimage/e4686d7f5bf904a924ae0cfeb58d0827c6d5b966.image.tar.gz --preferred_kernel=projects/google/global/kernels/gce-v20130603

It gives:

INFO: Waiting for insert of image elasticsearch-0-90-2. Sleeping for 3s.
+---------------------+-------------------------------------------------+
|      property       |                      value                      |
+---------------------+-------------------------------------------------+
| name                | operation-1372347522289-4e0248e924631-f9512254  |
| region              |                                                 |
| zone                |                                                 |
| creation-time       |                                                 |
| status              | DONE                                            |
| progress            | 100                                             |
| status-message      |                                                 |
| target              | elasticsearch-0-90-2                            |
| target-id           |                                                 |
| client-operation-id |                                                 |
| insert-time         | 2013-06-27T08:38:42.289-07:00                   |
| user                | 338179480470@project.gserviceaccount.com        |
| start-time          | 2013-06-27T08:38:42.346-07:00                   |
| end-time            |                                                 |
| operation-type      | insert                                          |
| error-code          | 403                                             |
| error-message       | FORBIDDEN                                       |
| warning             |                                                 |
| warning-message     |                                                 |
|                     |                                                 |
| errors              |                                                 |
|                     |                                                 |
|   error             | PERMISSIONS_ERROR                               |
|   message           | Required 'read' permission for 'rawDisk.source' |
+---------------------+-------------------------------------------------+

I don't understand the error message.

I can read my disk using:

$ gsutil ls gs://esimage

gives

gs://esimage/e4686d7f5bf904a924ae0cfeb58d0827c6d5b966.image.tar.gz

I'm using gcutil 1.8.1.

Did I miss to add a permission somewhere? Thanks for your help.

dadoonet
  • 14,109
  • 3
  • 42
  • 49

1 Answers1

1

Found the issue. I was launching this command from a Google Compute Engine instead of my local machine as stated in documentation.

dadoonet
  • 14,109
  • 3
  • 42
  • 49
  • If you launch the VM with the appropriate service account scopes (`--service_account_scopes=compute-rw,storage-full`) this should work. – Joe Beda Jun 28 '13 at 17:30
  • Great! Thanks. You could add it as an answer. – dadoonet Jun 28 '13 at 23:06
  • After new testing, it still does not work with storage-full scope. Same error: Required 'read' permission for 'rawDisk.source'. Any idea? – dadoonet Jul 08 '13 at 20:17