Managing Images

Shared Image Access between Projects in the same Region

General access to the system image allows you to avoid uploading it to the cloud multiple times and spending funds on storing it in different projects.

Follow these steps to use an image from another project:

  1. Copy the UUID of the recipient project in the list of projects (in the format 07554cec9bd74a58a3798a123cc038e7).
  2. Go to the sender project management interface by clicking on the project name.
  3. Add access for the recipient project by inserting the previously copied UUID in the image accordion menu of the sender project’s image list.
  4. Go to the Images section of the recipient project.
  5. Expand the (⋮) menu and select Receive image from another project.
  6. The UUID field will be automatically populated with the value of the source image.
  7. The image will be available immediately after clicking Receive image.

After completing all the steps, you can start working with the image.

Copying the Images between Regions in the Control panel

Copying the image between any regions and projects is carried out in the following order:

  1. Copy URL of the desired image in the list of project images on the Images section. To do this, right-click the Upload image button and select Copy link address.
  2. Go to the project that you want to transfer the image to and select the desired region on the Images section.
  3. Click Create image.
  4. Specify the new image parameters in accordance with paragraph 3 of the instructions for creating an image. Specify the copied image URL as the image source.

The image will appear in the list. This type of transfer is performed by copying the data to the target project, so the region’s resources must have a sufficient quota for the Image storage.

Copying the Images between Regions through Console Clients

When copying images between regions, the image properties are not saved and need to be reinstalled. The same situation will occur if you save the volume image to your computer and then upload it from file, or if you upload the image from URL.

To copy images between the regions:

  1. Get the properties of the image to copy.
  2. Create an image from file with the correct properties.

Browse through the list of images:

glance image-list

Get the properties of the image to copy:

glance image-show <image>

Create an image from file with the correct properties with the command:

openstack image create <image> \
--container-format <container> \
--disk-format <format> \
--file <file> \
--property hw_disk_bus=scsi \
--property hw_scsi_model=virtio-scsi 

For Windows-based images, you need to add the following properties:

--property hw_disk_bus=scsi \
--property hw_firmware_type=uefi \
--property hw_qemu_guest_agent=yes \
--property hw_scsi_model=virtio-scsi \
--property os_distro=windows2012 \
--property os_type=windows \
--property x_sel_image_agent_type=cloudbase-init \
--property x_sel_image_os_arch=amd64 \
--property x_sel_image_os_dist=windows \
--property x_sel_image_os_type=windows \
--property x_sel_image_type=master \
--property x_sel_license_name=license_windows_2012_standard

For Linux-based images, you need to add the following 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=cloudbase-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 \

Example of a command for adding properties to an image that is uploaded by URL:

glance image-create-via-import \
--import-method web-download \
--uri <uri> \
--name <image> \
--disk-format raw \
--container-format bare \
--property x_sel_image_os_type=linux

You can update the properties of an already existing image with the command:

 glance image-update <IMAGE_ID> --property <1> --property <2> --property <3>

Best Practices for Installing a FreeBSD Image

Please note that we recommend using prе-built vm images. For FreeBSD it is download.freebsd.org/ftp/snapshots/VM-IMAGES/13.0-CURRENT/amd64/Latest/FreeBSD-13.0-CURRENT-amd64.raw.xz. The image must be unpacked before uploading it into Glance.

Specify the following properties to upload the image correctly:

--property hw_disk_bus=scsi \
--property hw_qemu_guest_agent=yes \
--property hw_scsi_model=virtio-scsi \
--property os_distro=freebsd \
--property x_sel_image_agent_type=cloud-init \
--property x_sel_image_os_arch=amd64 \
--property x_sel_image_os_dist=freebsd \
--property x_sel_image_os_type=freebsd \
--property x_sel_image_type=master

Please note that we recommended installing cloud-init to ensure correct integration of the image with our panel. If cloud-init is not installed, then the x_sel_image_agent_type option should not be present.

Also, you need to install virtio drivers, see more.

Removing Image Properties

Use the --remove-property key to remove an image property, for example:

glance image-update <IMAGE_ID> --remove-property os_distro --remove-property x_sel_image_os_dist