Download and create an image
You can download images to the Selectel image repository:
You can create your own disk image.
Limitations
When uploading an image to the Selectel Image Store from a file and link, the image size must be less than 2048 GB (2 TB).
If you need to load an image from a larger file size, upload it through the object store.
You can create an image from a disk size less than 2048 GB (2 TB).
Load an image from a file
You can download an image to the Selectel image repository from a file on your local computer. Check it out restrictions on the size of the downloaded image.
Control panel
OpenStack CLI
-
В control panels go to Cloud platform → Images.
-
Click Create an image.
-
Enter a name for the image.
-
Select pool segment into 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 a file as the image source.
-
Click Download.
-
Select an image format or container format. For more information about formats, see the subsection Own images.
If you download an archive with the container format
.ova
We recommend unpacking the archive before downloading to make the image work correctly.If you do not know which formats to specify, specify the image format
raw
and the container —bare
. -
Optional: check the checkbox Specify the minimum disk and memory capacity. 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 these limits.
-
Click Create.
The image will only be available for the single project and pool for which you configured authorization in OpenStack API.
-
Create an image:
glance image-create \
--name <image_name> \
--disk-format <image_format> \
--container-format <container_format> \
--file <path> \
--property hw_disk_bus=scsi \
--property hw_scsi_model=virtio-scsi \
--store <pool_segment>Specify:
-
<image_name>
— image name; -
<image_format>
— image format. For more information about image formats, see the subsection Own images. If you do not know which format to specify, specifyraw
; -
<container_format>
— container format. More information about container formats in the subsection Own images.If you download an archive with the container format
.ova
We recommend unpacking the archive before downloading to make the image work correctly.If you don't know which format to specify, specify
bare
; -
<path>
— path to the image file; -
<pool_segment>
— pool segment into which the image will be loaded, e.g.ru-1a
. The list of available pool segments can be viewed in the table below Selectel Infrastructure. Images smaller than 16 GB are automatically replicated to neighboring pool segments.
-
Download the image by clicking here
You can upload an image to the Selectel image repository via a public link to the image file. See restrictions on the size of the downloaded image.
Control panel
OpenStack CLI
-
В control panels go to Cloud platform → Images.
-
Click Create an image.
-
Enter a name for the image.
-
Select pool segment into 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 a link to the image file in the format
https://domain.com/file.raw
. -
Select an image format or container format. For more information about formats, see the subsection Own images.
If you download an archive with the container format
.ova
We recommend unpacking the archive before downloading to make the image work correctly.If you do not know which formats to specify, specify the image format
raw
and the container —bare
. -
Optional: check the checkbox Specify minimum disk and memory capacity. 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 these limits.
-
Click Create.
The image will only be available for the single project and pool for which you configured authorization in OpenStack API.
-
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>
— image file reference in the formathttps://domain.com/file.raw
; -
<image_name>
— image name; -
<image_format>
— image format. For more information about image formats, see the subsection Own images. If you do not know which format to specify, specifyraw
; -
<container_format>
— container format. More information about container formats in the subsection Own images.If you download an archive with the container format
.ova
We recommend unpacking the archive before downloading to make the image work correctly.If you don't know which format to specify, specify
bare
; -
<pool_segment>
— pool segment into which the image will be loaded, e.g.ru-1a
. The list of available pool segments can be viewed in the table below Selectel Infrastructure. Images smaller than 16 GB are automatically replicated to neighboring pool segments.
-
Load image via object storage
-
Upload the image to the object store through segmented downloading.
-
In the query output, copy the value
X-Subject-Token
. -
Open the CLI on the local computer.
-
Create a request to create an image:
curl 'https://<pool>.cloud.api.selcloud.ru/image/v2/images' \
-H 'X-Auth-Token: <keystone_token>' \
-H 'Content-Type: application/json;charset=utf-8' \
--data '{"name":"<image_name>","disk_format":"<image_format>","container_format":"<container_format>"}'Specify:
-
<pool>
— pool into which the image will be loaded, e.g.ru-1
. The address (URL) depends on the region and pool, you can look in the URL list. The list of available pools can be viewed in the table Selectel Infrastructure; -
<keystone_token>
— Keystone token that you copied in step 3; -
<image_name>
— image name; -
<image_format>
— image format. For more information about image formats, see the subsection Own images. If you do not know which format to specify, specifyraw
; -
<container_format>
— container format. More information about container formats in the subsection Own images.If you download an archive with the container format
.ova
We recommend unpacking the archive before downloading to make the image work correctly.If you don't know which format to specify, specify
bare
.
-
-
In the query output, copy the value
id
. -
Upload the image to the image repository:
curl 'https://<pool>.cloud.api.selcloud.ru/image/v2/images/<image_id>/import' \
-X POST \
-H 'Content-Type: application/octet-stream' \
-H 'X-Image-Meta-Store: <pool_segment>' \
-H 'X-Auth-Token: <keystone_token>' \
--data-raw '{"method":{"name":"web-download","uri":"<object_storage_url>"}}'Specify:
<pool>
— pool into which the image will be loaded, e.g.ru-1
. The address (URL) depends on the region and pool, you can look in the URL list. The list of available pools can be viewed in the table Selectel Infrastructure;<image_id>
— ID of the image you copied in step 6;<pool_segment>
— pool segment into which the image will be loaded, e.g.ru-1a
. The list of available pool segments can be viewed in the table below Selectel Infrastructure;<keystone_token>
— Keystone token that you copied in step 3;<object_storage_url>
— reference to an image in an object storage of the formhttps://<uuid>.selstorage.ru/container_name/object_name
that you got in step 7.
Download the vmdk from a file or from a link
Check it out restrictions on the size of the downloaded image.
Control panel
OpenStack CLI
-
Export the virtual machine from VMware in the format
.ovf
. Read more in the instructions Export an ovf Template VMware documentation.If the virtual disk type is
MONOLITHIC_SPARSE
orMONOLITHIC_FLAT
You can skip this step, but we recommend that you export the VM in the following format.ovf
. -
В control panels go to Cloud platform → Images.
-
Click Create an image.
-
Enter a name for the image.
-
Select pool segment into 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 a file or URL as the image source.
-
If you have selected a file, press Download.
-
If you selected URL, enter a link to the image file in the format
https://domain.com/file.raw
. -
Select the format of the image:
vmdk
— If the virtual machine was exported from VMware in the format.ovf
or you boot a virtual disk with the typeMONOLITHIC_SPARSE
;raw
— if you boot a virtual disk with the typeMONOLITHIC_FLAT
.
-
Select the container format:
ovf
— if the virtual machine was exported from VMware in the format.ovf
;bare
— if you boot a virtual disk with the typeMONOLITHIC_SPARSE
orMONOLITHIC_FLAT
.
-
Optional: check the checkbox Specify minimum disk and memory capacity. 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 these limits.
-
Click Create.
The image will only be available for the single project and pool for which you configured authorization in OpenStack API.
-
Export the virtual machine from VMware in the format
.ovf
. Read more in the instructions Export an ovf Template VMware documentation.If the virtual disk type is
MONOLITHIC_SPARSE
orMONOLITHIC_FLAT
You can skip this step, but we recommend that you export the VM in the following format.ovf
. -
Create an image:
glance image-create \
--name <image_name> \
--file <path> \
--disk-format=<image_format> \
--container-format=<container_format> \
--property hw_disk_bus=scsi \
--property hw_scsi_model=virtio-scsi \
--store <pool_segment>Specify:
<image_name>
— image name;<path>
— path to the image file;<image_format>
— image format:vmdk
— If the virtual machine was exported from VMware in the format.ovf
or you boot a virtual disk with the typeMONOLITHIC_SPARSE
;raw
— if you boot a virtual disk with the typeMONOLITHIC_FLAT
;
<container_format>
— container format:ovf
— if the virtual machine was exported from VMware in the format.ovf
;bare
— if you boot a virtual disk with the typeMONOLITHIC_SPARSE
orMONOLITHIC_FLAT
;
<pool_segment>
— pool segment into which the image will be loaded, e.g.ru-1a
. The list of available pool segments can be viewed in the table below Selectel Infrastructure. Images smaller than 16 GB are automatically replicated to neighboring pool segments.
Create an image from a disk
An image is a complete copy of a disk. An image can be created from any local or network cloud server disk. The disk can be either a boot disk or an optional disk. Check it out restrictions to the size of the disk from which you can create an image.
You can use the image:
- to quickly configure identical cloud servers — server cloning. If the server has the operating system and software installed, you can deploy already configured servers from the boot disk image. This is faster than setting up the desired configuration of multiple servers;
- to change the type of boot disk;
- transferring the server to other pools, projects or accounts;
- cloud server disk export;
- If the image from which the server was previously created is deleted, you can create an image from the server disk and, if necessary, create the same cloud server.
Control panel
OpenStack CLI
-
If the disk is connected to a cloud server, we recommend that you shut down the cloud server — a non-consistent image may be created from a working disk.
-
В control panels go to Cloud platform → Images.
-
Click Create an image.
-
Enter a name for the image.
-
Select pool segment into 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 disk as the image source.
-
Select the disk from which the image will be created. You can only create an image in the pool segment where the disk is located.
-
Optional: check the checkbox Specify minimum disk and memory capacity. 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 these limits.
-
Click Create.
The process of creating an image depends on the type of disk.
The image will only be available for the single project and pool for which you configured authorization in OpenStack API.
Local disk
Network disk
-
If the disk is connected to a cloud server, we recommend shutting down the cloud server — a non-consistent image may be created from a running disk:
openstack server stop <server>
Specify
<server>
— ID or server name. The list can be viewed using the commandopenstack server list
The server will go into status
SHUTOFF
. -
Create a local disk image:
openstack server image create --name <image_name> <server>
Specify:
<image_name>
— image name;<server>
— ID or server name. The list can be viewed withopenstack server list
-
If the disk is connected to a cloud server, we recommend shutting down the cloud server — a non-consistent image may be created from a running disk:
openstack server stop <server>
Specify
<server>
— ID or server name. The list can be viewed using the commandopenstack server list
The server will go into status
SHUTOFF
. -
Disconnect the network drive from the server:
openstack server remove volume <server> <volume>
Specify:
<server>
— ID or server name. The list can be viewed withopenstack server list
;<volume>
— ID or name of the network drive. You can view the list withopenstack volume list
-
Check that the network drive has reached the status of
AVAILABLE
:openstack volume list
-
Create a network disk image:
openstack image create --volume <volume> <image_name>
Specify
<image_name>
— image name.