Can you share private images across projects?

2,150 views
Skip to first unread message

michael lovett

unread,
Jan 13, 2016, 12:52:55 PM1/13/16
to gce-discussion
We have created a private image with custom software on it, which we'd like to use as the basis for CE instances in various projects in our company.  So far, I can't see an easy way to use that one image to start instances in different projects and/or any way to copy that image to other projects.

Is anything like this possible?

Michael

Faizan (Google Cloud Support)

unread,
Jan 13, 2016, 3:30:35 PM1/13/16
to gce-dis...@googlegroups.com
Hello Michael,

One way to move a custom image from project 1 to project 2 is by exporting it to Google Cloud Storage from project 1 and than importing in project 2. You can refer to these links[1][2] for steps and more information. Another workaround that I have tested is using gcloud commands, the steps are as following:

1. Make sure you have at least editor permissions in both the projects.

2. Run $ gcloud compute images describe IMAGE-NAME --project PROJECT1

3. From the output copy the url from 'selfLink' which will look like this "https://www.googleapis.com/compute/v1/projects/PROJECT/global/images/IMAGE"

4. Use gcloud to create an instance in project 2 using the image in project 1:
$ gcloud config set project <project-id-of-project-2>
$ gcloud compute instances create <name of instance> --image "https://www.googleapis.com/compute/v1/projects/PROJECT/global/images/IMAGE"

5. Once you have your instance created in project 2 you can create an image from your source disk. The steps are documented in this link link.

I hope that helps.

Faizan

Shanmugam Kulandaivel

unread,
Nov 8, 2016, 6:51:20 PM11/8/16
to gce-discussion
Hi Michael -  We launched a new IAM role earlier this week that enables users to securely share images in one project with other users. 

You can find more information at https://cloud.google.com/compute/docs/images/sharing-images-across-projects

Thanks,
Shanmugam

Tai Tran

unread,
Jan 24, 2017, 7:00:51 PM1/24/17
to gce-discussion
Hi Shanmaugam, is there a way once an image is shared with a project for the receiving project to import the image into their image list?

Thanks,
Tai

Shanmugam Kulandaivel

unread,
Jan 29, 2017, 5:22:44 PM1/29/17
to Tai Tran, gce-discussion
Hi Tai - not currently, but we are aware of the ask (being able to easily import an image that you have a access) and considering adding this feature.  I'll update the post as and when we have an update on this to share. 

May I ask what the scenario is? Why do you want to be able to clone a shared image into your images list? 

thanks

--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-discussion@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to gce-discussion@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/0437c95f-1c4c-4ca6-89d3-bb3d7c46018b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

taix...@gmail.com

unread,
Jan 29, 2017, 6:37:56 PM1/29/17
to Shanmugam Kulandaivel, gce-discussion

Hi Shanmugam, We share images to different projects, but don’t want to maintain the images long term.  Ideally, the receiving project could clone the image so we could just delete it on this end.

--

Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.


---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.

To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.

Shanmugam Kulandaivel

unread,
Jan 30, 2017, 2:54:38 PM1/30/17
to Tai Tran, gce-discussion
Thanks for the background. I'll update this post as and when we have an update on this request. 

Thanks
Shan

--

Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-discussion@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.


---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.

To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to gce-discussion@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages