Why do I get "Required 'compute.images.get' permission for..." error when cloning an instance?

2,816 views
Skip to first unread message

Inspired Earth

unread,
Jul 30, 2018, 6:58:20 PM7/30/18
to gce-discussion
I am working on a production web site on a Google Compute instance.

I want to set up a staging site, and read that the quickest way to do that is to clone the production instance.

When attempting to clone it, I get the error:

Required 'compute.images.get' permission for 'projects/wordpress-sites-170807/global/images/SANITISED-template'


I've not been able to find any useful reference to Required 'compute.images.get' permission in any Google search.

Questions:

1. What causes this error?

2. How do I resolve it?


Fady (Google Cloud Platform)

unread,
Jul 31, 2018, 5:25:22 PM7/31/18
to gce-discussion

I suspect you are sharing an image across projects, and you do not have the compute.images.get permission on the project that includes the original image. Thus, getting the image from the originating project, you need to add the “roles/compute.imageUser” role on the project's IAM. That role should include the “get, list, and use” permissions. For further information about the subject, you may refer to this document.


If that is not the case, and since you opened this issue tracker report, I’ll be glad to further investigate it with you at that report.


Inspired Earth

unread,
Aug 6, 2018, 2:53:15 AM8/6/18
to gce-discussion
Hi Fady,

The images are on the one project. Actually, it's not an image I am sharing. Rather I am hitting "Clone" in the online instance manager. I'll jump over to the issue tracker. Thanks.

Fady (Google Cloud Platform)

unread,
Aug 16, 2018, 4:12:27 PM8/16/18
to gce-discussion

As to benefit the community if someone is facing the same issue. The clone button in Cloud Console copies the configuration of the instance and adds them into a new template. It does not clone the instance’s persistent disks into a new instance. So if your goal is to have an identical instance including the data on it, it won’t work. It will just create a new instance with the same configuration from the original source image.  


In this case, it seems that the original configuration of the instance included the source image from a different project which you have no access to now.


To clone the instance’s configurations including the persistent disk (identical instance), you should first create a new snapshot or image from the persistent disk, and then to retain other configs you may use the clone button, but change the source image to the snapshot or image you have created earlier.


Fady (Google Cloud Platform)

unread,
Oct 9, 2018, 8:41:05 PM10/9/18
to gce-discussion

As to update the community, and due to your important feedback, the “Clone” button was replaced with a “Create Similar” button. As mentioned above, it creates a template that is similar in configuration with the original instance. It does not create an identical instance with an identical disk (same data) . To create an identical instance with the same data, you need to create an instance from a snapshot or an image.


Reply all
Reply to author
Forward
0 new messages