Transfer (copy) the image and configure image sharing
You can create or download an image:
- transfer (copy) to another pool segment, project, or account — a new image will be created, which can be managed in the source project and in the target project. Storage of all copies of the image is paid for;
- or set up access to the image between projects within the same pool — the image can be managed only in the source project. It is paid to store the image only in the source project.
In both cases, cloud servers and disks can be created from the images.
Transfer (copy) an image to another pool segment, project, or account
To copy an image, you need to get its URL and create a new image from it. You cannot transfer an image directly.
You can copy an image to another pool segment (including a different availability zone or region), project or account.When copying an image to another project or account, you can also change the pool segment.If you need to copy an image within one pool segment, set up access to the image between projects — you will only be charged for storing the image in the original project.
Storage of all copies of the image is paid for using the cloud platform payment model.You can manage the image and create cloud servers and disks from it in both the source project and the target project.
After copying, you can delete the original image from the image repository.
Control panel
OpenStack CLI
-
In the Dashboard, on the top menu, click Products and select Cloud Servers.
-
Go to the Images section.
-
From the image menu, select Copy image URL.
-
Open the projects menu and select the target project to which you want to copy the image.
-
Click Create Image.
-
Enter a name for the image.
-
Select the pool segment to which the image will be loaded.
Images smaller than 16 GB are automatically replicated to neighboring segments in the pool.
-
Select the operating system.
-
Select the URL as the source of the image.
-
Enter the link you copied in step 3.
-
Select an image format or container format. For more information about formats, see Own Images.
If you don't know what formats to specify, specify
raw
image format,bare
container format. -
Optional:Check the Specify minimum disk and memory size checkbox and specify the RAM size in MB and disk size in GB. This is the minimum disk and RAM size with which you can create a server from this image. You cannot specify minimum values for images in
iso
format.Once the image is created, you cannot change the minimum disk and memory size in the control panel.
-
Click Create.
-
Optional: delete the source image from the image repository.
-
In the Dashboard, on the top menu, click Products and select Cloud Servers.
-
Go to the Images section.
-
From the image menu, select Copy image URL.
-
Create a blank image:
openstack image create <image_name>
Specify
<image_name>
— image name. -
Import the file into the image:
openstack image import \
--method web-download \
--uri <image_url> \
<image>Specify:
<image_url>
— link to the image file in the formathttps://example.com/file.raw
;<image>
— The ID or name of the image you created in step 4.
-
If the image is Linux-based, additionally add properties:
--property hw_disk_bus=scsi \
--property hw_qemu_guest_agent=yes \
--property hw_scsi_model=virtio-scsi \
--property os_distro=ubuntu \
--property os_type=linux \
--property x_sel_image_agent_type=cloud-init \
--property x_sel_image_os_arch=amd64 \
--property x_sel_image_os_dist=ubuntu \
--property x_sel_image_os_type=linux \
--property x_sel_image_type=master \ -
Optional: delete the source image from the image repository.
Configure image access between projects
You can configure image sharing between projects of the same or different accounts. In the target project you can create cloud servers and disks from the image, but you can manage the image only in the source project: rename, change the operating system, delete the image. The image storage is paid for only in the source project — according to the payment model of the cloud platform.
You can configure the image to be accessed only within the pool.
You can disable image access in the target project.
Configure access to the project image from a single account
Control panel
OpenStack CLI
-
In the dashboard, on the top menu, click Products and select Cloud Servers.
-
Copy the ID of the target project to which you want to copy the image. To do this, open the projects menu and in the line of the desired project click .
-
Switch to the project where the image is located. To do this, open the projects menu and select the source project.
-
From the top menu, click Products and select Cloud Servers.
-
Go to the Images section.
-
In the image card, open the Projects block.
-
Click Add Project.
-
Paste the target project ID you copied in step 2.
-
Click .
-
Copy the UUID of the image.
-
Open the projects menu and select the target project.
-
From the top menu, click Products and select Cloud Servers.
-
Go to the Images section.
-
Make sure you select the pool to which you want to transfer the image.
-
On the section page, click .
-
Paste the UUID of the image you copied in step 10.
-
Click Accept Image.
-
Make the image available for porting:
openstack image set --shared <image_id>
Specify
<image_id>
— ID of the image you want to configure access to. -
Add an image to the target project:
openstack image add project <image_id> \
<project_id>Specify:
<image_id>
— The ID of the image to which you want to configure access;<project_id>
— ID of the project in which the image will be available.
-
If you, as a service user, have access to the target project, change the authorization data. If you do not have access, the image must be taken by a service user with the Project Administrator role.
-
If you changed the authorization data in step 4, accept the image in the target project:
openstack image set --accept <image_id>
Specify
<image_id>
— image ID.
Configure access to the project image from another account
Control panel
OpenStack CLI
-
Open an account with a target project.
-
In the dashboard, on the top menu, click Products and select Cloud Servers.
-
Copy the ID of the target project to which you want to copy the image. To do this, open the projects menu and in the line of the desired project click .
-
In the upper right corner, open the menu (account number) and select the account with the project where the image resides.
-
Switch to the project where the image is located. To do this, open the projects menu and select the source project.
-
From the top menu, click Products and select Cloud Servers.
-
Go to the Images section.
-
In the image card, open the Projects block.
-
Click Add Project.
-
Paste the target project ID that you copied in step 4.
-
Click .
-
Copy the UUID of the image.
-
In the upper right corner, open the menu (account number) and select the account with the target project.
-
Switch to the target project. To do this, open the project menu and select the target project.
-
From the top menu, click Products and select Cloud Servers.
-
Go to the Images section.
-
Make sure you select the pool to which you want to transfer the image.
-
On the section page, click .
-
Paste the UUID of the image you copied in step 13.
-
Click Accept Image.
-
Make the image available for porting:
openstack image set --shared <image_id>
Specify
<image_id>
— ID of the image for which you want to configure access. -
Add an image to the target project:
openstack image add project <image_id> \
<project_id>Specify:
<image_id>
— The ID of the image for which you want to configure access;<project_id>
— ID of the project in which the image will be available.
-
If you, as a service user, have access to the target project, change the authorization data. If you do not have access, the image must be taken by a service user with the Project Administrator role.
-
If you changed the authorization data in step 4, accept the image in the target project of the other account:
openstack image set --accept <image_id>
Specify
<image_id>
— image ID.