View Only

Image sharing across multiple projects

By Archive User posted Wed August 14, 2019 11:30 AM


With PowerVC 1.4.4 release, you can set the image visibility to share images across multiple projects or tenants without explicitly creating members. PowerVC supports only two visibility options i.e. private and public. By default, any image created is private to the project. Public images are also called shared images. This can be achieved by changing the visibility of the image through PowerVC GUI, REST API, or through OpenStack CLI command.
Feature highlights

  • PowerVC cloud has different tenants or projects. The image sharing feature enables sharing of images in different tenants or projects.

  • This will supported from PowerVC GUI, REST API and Openstack CLI commands.

  • Public images can be created only using Admin role from ibm-default project in PowerVC.

  • Images with 'public' visibility can be viewed across all projects.

  • Only admin users of the other projects can deploy 'public' images shared from ibm-default project.

  • Public images owned by ibm-default project cannot be deleted by other projects.

Let's see a use case now.

Use Case

By default, PowerVC GUI creates images with private visibility. Assuming that you are an administrator and want to share an image across multiple projects. You can share the image through any of the following methods.

Method 1 - Using PowerVC GUI

Create an image and set visibility to public

  1. After logging in to PowerVC user interface, (admin users) select the ibm-default project.

  2. Go to Images section and click Create to create an image.

    You can see that this image is not visible to other projects.

  3. Change visibility from ibm-default project GUI.

  4. Now the image is available in other projects.Project admin can use this image for further VM provisioning.

Method 2 - Using REST API

Set the image visibility to 'public' by running the following REST API.

Resource: {management_ip}/powervc/openstack/image/v2/images/{image_id}

Method Parameters
PATCH path:/visibility

Method 3 - Using OpenStack CLI commands

To list the image properties, run:
  • openstack image show IMAGE

To set the image visibility to 'public' run:
  • openstack image set IMAGE --public

Note: To run the OpenStack image CLI, we should source /opt/ibm/powervc/powervcrc.

PowerVC GUI will throw exception in the following cases,

1. When a user attempts to deploy a virtual machine using deploy template created with public image, and which is deleted by the admin in the ibm-default project.

2. When a user attempts to deploy a virtual machine using deploy template having public image and the admin modified it's visibility to private in the ibm-default project.

You have seen that setting the visibility of an image and making it available across projects is so simple.
Please post your comments or queries in the comments section below and don't forget to follow us on LinkedIn, Facebook, and Twitter.

Author: Maria Varghese




Thu January 09, 2020 08:46 AM

Yes, you are correct. Non-admin users in Cloud PowerVC edition will be able to use these shared images indirectly if admin of such projects have created any deploy template using the shared image. However, in the case of standard edition, the non-admin users will only be able to see the Shared images. There won't be any Deploy option for these images incase of normal users

Thu January 09, 2020 08:41 AM

Hi Francesco,

Only admins of other projects would be able to see and use(deploy) public images. This holds true for both Standard Edition and Cloud Edition.

For cloud Edition, if a deploy template has been created with public images, then those deploy templates would be usable/seen by admins and self service users and not to project managers.
So we have extended this feature for self service users other than admins to cloud edition.
But only restriction is that irrespective of auto approval cloud policy(deploy template deploy does not require approval from admins till some limit) set for self service users, deploy request for deploy templates which has public images would always require an administrator approval.

Wed January 08, 2020 02:50 PM

Do I understand correctly that a non admin user in a custom project can deploy (indirectly) a shared image only as part of a deploy template, thus only with Cloud PowerVC Manager and not with PowerVC Standard Edition?