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 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 a different pool segment (including a different availability zone or region), project, or account. When you copy 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, set up image access between projects — only the original image will be charged for storage.
Storage of all copies of the image is paid for according to the payment model of the cloud platform. You can manage the image and create cloud servers and disks from it both in the source project and in the destination project.
After copying, you can delete the original image from the image repository.
Control panel
OpenStack CLI
-
In the Control panel, 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 destination 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 Control panel, 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.
Customize image access between projects
You can configure image sharing between projects of the same or different accounts. You can create cloud servers and disks from the image in the recipient project, 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 cloud platform payment model.
You can configure the image to be accessed only within the pool.
You can disable access to the image in the destination project.
Between projects of the same account
Between projects of different accounts
-
In the Control panel, on the top menu, click Products and select Cloud Servers.
-
Copy the ID of the destination 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 destination project ID you copied in step 2.
-
Click .
-
Copy the UUID of the image.
-
Open the projects menu and select the destination 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.
-
Open an account with the recipient project.
-
In the dashboard, on the top menu, click Products and select Cloud Servers.
-
Copy the ID of the destination 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 destination project ID 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 recipient project.
-
Switch to the destination project. To do this, open the projects menu and select the destination 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 12.
-
Click Accept Image.