Sharing images between Public Cloud projects
Objective
A situation may arise where you need to share an Instance backup image or a Volume backup image between several Public Cloud projects.
With OpenStack, it is possible to share an image between projects, even if they don't belong to the same account.
This feature offers many possibilities, but it also has its risks. It is therefore important to understand how it works.
For example, if we want to share an image from Project A with Project B (in the same or different account), the following rules apply:
- Images can only be shared within the same region. For example, an image created in Project A in the GRA11 region will only be available for Project B within the same GRA11 region.
- The image remains physically attached to Project A. Project B only has "access authorization" to this image.
- If Project A removes access to the image (like ACL, image deletion or if the project is deleted for unpaid invoices, etc.), the instances running from this image on Project B may not work anymore due to migration or rebuild issues.
It is therefore important to keep this in mind before engaging in this setup.
For more information, please consult the Official OpenStack documentation.
This guide will show you how to share images between one or more projects while preserving the configuration and state of the image.
Requirements
Before following these steps, it is recommended that you first read this guide:
You will also need the following:
- a Public Cloud Instance in your OVHcloud account
- an OpenStack user
This guide references the use of the OpenStack command-line client.
Instructions
Share an Image
First, run the following command to list your existing images:
In order to be shared, an image must first be set to "shared" visibility.
You can run the following command to list your images that can be shared with another project:
Add a project to an image
The next step is to add the UUID of a different project as a member of the image. In our example below, we add the UUID of "Project B" to the image.
Once this is done, check the request on project B:
If the sharing request is in pending status, you have to accept it:
Once completed, check that you can see and access the image:
Verify all the members of an image
To see all the projects which have access to the image, from the source project (in this case project A), you can run this command:
Delete a member of an image or unshare an image
In the source project (project A), you can delete a member of the share:
Go further
Transfer an instance backup from one datacentre to another.
Join our community of users.