Transfer (copy) the image and configure image sharing
You can create or download an image:
- move (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 destination project. Storage of all copies of the image is chargeable;
- or configure image access between projects within the same pool — the image can only be managed in the source project. It pays to store the image in the original project only.
In both cases, cloud servers and disks can be created from the images.
Transfer (copy) the 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 can't transfer the image directly.
The image can be copied to another pool segment (including a different availability zone or region), cloud platform 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 the same pool segment, configure image access between projects — only the storage of the original image will be charged.
Storage of all image copies is paid for using cloud platform payment model. You can manage the image and create cloud servers and disks from it in both the source and destination project.
After copying, you can delete the original image from image storage.
- Control panel
- OpenStack CLI
-
In Control Panel, go to Cloud Platform → Objects.
-
From the ( ) menu of the image, select Copy image URL.
-
Open the projects menu (name of the current project) and select the destination project to which you want to copy the image.
-
Click Create Image.
-
Enter a name for the image.
-
Select the pool segment into which to load the image.
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 2.
-
Select an image format or container format. More details about formats in the [Own Images] subsection(docs/cloud/servers/images/about-images.mdx#own-images).
If you don't know which formats to specify, specify the image format as
raw
, the container format asbare
. -
Optional: check the Specify minimum disk and memory size checkbox. Specify the minimum amount of RAM in MB and disk capacity in GB. When you create a cloud server from this image, the control panel or API will automatically check for these restrictions.
-
Press Create.
-
Optional: delete source image from image storage.
-
In Control Panel, go to Cloud Platform → Objects.
-
From the ( ) menu of the image, select Copy image URL.
-
Create an image:
glance image-create-via-import \
--import-method web-download \
--uri <image_url> \
--name <image_name> \
--disk-format <image_format> \
--container-format <container_format> \
--property hw_disk_bus=scsi \
--property hw_scsi_model=virtio-scsi \
--property x_sel_image_owner=Selectel \
--property hw_qemu_guest_agent=yes \
--store <pool_segment>Specify:
<image_url>
is the link you copied in step 2;<image_name>
is the name of the image;<image_format>
is the format of the image. For more information about image formats, see Own Images. If you don't know which format to specify, specifyraw
;<container_format>
— container format. For more information about container formats, see Own Images. If you don't know which format to specify, specifybare
;<pool_segment>
— pool segment into which the image will be loaded, e.g.ru-1a
. Images smaller than 16 GB are automatically replicated to neighboring pool segments.
-
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 \ --property x_sel_image_type=master -
Optional: delete source image from image storage.
Configure image access between projects
You can configure image sharing between cloud platform projects within the same account. In the destination project, cloud servers and disks can be created from the image, but the image can be managed only in the source project: rename, change the operating system, delete the image. Image storage is only paid for in the source project — by cloud platform payment model.
You can configure the image to be accessible only within pool.
In the destination project, you can disable-access-to-image.
- In Control Panel, go to Cloud Platform.
- Copy the ID of the destination project to which you want to copy the image. Open the projects menu (name of the current project) and in the row of the desired project click .
- Make sure you are in the project where the image is located. Open the projects menu (name of the current project) and select the source project.
- Go to Cloud Platform → Objects.
- Open the image card.
- Click Add Project.
- Paste the destination project ID you copied in step 2.
- Click .
- Copy the UUID of the image.
- Open the projects menu (name of the current project) and select the destination project.
- Go to Cloud Platform → Objects. Make sure you select the pool to which you want to transfer the image.
- From the menu ( ) of the section, select Get image from another project.
- Paste the UUID of the image you copied in step 9.
- Click Get Image.