Share an Image with Another Project

You can share an image from your project with a collaborator in a different project so you can both launch instances using the same image. As the owner of the image, you can revoke the sharing privilege at any time.

Prerequisites:

  1. Both you and your collaborator need to use the OpenStack CLI.
  2. You will need to know the ID of your collaborator. Your collaborator can find the project ID using the openstack project list command or at this URL: https://redcloud2.cac.cornell.edu/horizon/identity/

Share an Image With Another Project

  1. Find the ID of the image you want to share:

    openstack image show <image name>
    

    Similar to project ID, this will be a long string of letters and numbers next to the name of your image. You will use the image ID, rather than the name, in the commands below.

  2. Share the image with your collaborator's project

    openstack image set --shared <image ID>
    openstack image add project <image ID> <collaborator's project ID>
    
  3. Verify the image is now shared:

    openstack image member list <image ID>
    

    The status field should say pending until your collaborator accepts the image.

  4. Give the ID of the shared image to your collaborator so they can follow the steps in the Accept a Shared Image section to add the image to their project.

Accept a Shared Image

  1. Get the ID of the shared image from the owner. Make sure the owner has performed the steps in the Share an Image section above.

  2. Source in the application credential for the project accepting the shared image.

  3. Accept the shared image:

    openstack image set --accept <image ID>
    
  4. Verify the image is now available to your project:

    openstack image list
    

If the image is listed in the output, it should also appear in the Horizon web console.

Unshare an Image

  • An image's owner can see which projects have access to the image

    openstack image member list <image ID>
    
  • The owner can unshare an image like this

    openstack image remove project <image ID> <project ID>