Upload and create an image
You can upload the following images to the Selectel image storage:
You can create a disk image from any local or network cloud server disk.
The disk can be either a boot or additional disk.
Such an image can be used for:
- for quick setup of identical cloud servers — server cloning. If an operating system and software are installed on the server, you can deploy already configured servers from a boot disk image. This is faster than configuring the required settings for multiple servers;
- changing the boot disk type;
- transferring a server to other pools, projects, or accounts;
- exporting a cloud server network volume;
- 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 an identical cloud server.
Limitations
When uploading an image to the Selectel image storage from a file or via a link, the image size must be less than 2048 GB (2 TB).
If you need to upload an image from a larger file, upload it via S3.
You can create an image from a disk smaller than 2048 GB (2 TB).
Upload image via S3
-
Upload the image to S3 using segmented upload.
-
In the request output, copy the value from the
X-Subject-Tokenfield. -
Open the CLI on your local computer.
-
Create an image via API:
curl 'https://<pool>.cloud.api.selcloud.ru/image/v2/images' \-H 'X-Auth-Token: <x_auth_token>' \-H 'Content-Type: application/json;charset=utf-8' \--data '{"name":"<image_name>","disk_format":"<image_format>","container_format":"<container_format>"}'Specify:
-
<pool>— pool the image will be uploaded to, for example,ru-1. You can find the list of available pools in the Selectel Infrastructure section of the Locations: countries, regions, availability zones, pools, and data center addresses guide; -
<x_auth_token>— project-scoped IAM token that you copied in step 3; -
<image_name>— image name; -
<image_format>— image format. Learn more about image formats in the Custom images section. If you do not know which format to specify, specifyraw; -
<container_format>— container format. Learn more about container formats in the Custom images section.If you upload an archive with the
.ovacontainer format, we recommend unpacking the archive before uploading so that the image works correctly.If you do not know which format to specify, specify
bare.
-
-
In the request output, copy the value in the
idfield. -
Upload the image to the image storage:
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: <x_auth_token>' \--data-raw '{"method":{"name":"web-download","uri":"<object_storage_url>"}}'Specify:
<pool>— pool the image will be uploaded to, for example,ru-1. You can find the list of available pools in the Selectel Infrastructure section of the Locations: countries, regions, availability zones, pools, and data center addresses guide;<image_id>— image ID that you copied in step 6;<pool_segment>— pool segment the image will be uploaded to, for example,ru-1a. You can find the list of available pool segments in the Selectel Infrastructure section of the Locations: countries, regions, availability zones, pools, and data center addresses guide;<x_auth_token>— IAM token that you copied in step 3;<object_storage_url>— link to the image in S3 likehttps://<uuid>.selstorage.ru/container_name/object_namethat you obtained in step 7.
Upload image from a file
In Selectel image storage, an image can be uploaded from a file of certain sizes from a local computer. Learn more about image size limitations in the Limitations section.
Control panel
OpenStack CLI
-
In the control panel, in the top menu, click Products and select Cloud Servers.
-
Go to the Images section.
-
Click Create image.
-
Enter the image name.
-
Select the location to which the image will be uploaded.
Images under 16 GB are automatically replicated to adjacent segments in the location pool.
-
Select an operating system.
-
Select a file as the image source.
-
Click Upload.
-
Select an image format or container format. Learn more about formats in the Custom images section.
If you upload an archive with the
.ovacontainer format, we recommend unpacking the archive before uploading so that the image works correctly.If you do not know which formats to specify, specify the image format
raw, container —bare. -
Optional: select 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 required to create a server from this image. For
.isoimages, you cannot specify minimum values.After creating the image, you cannot change the minimum disk and memory size in the control panel. To change the minimum values, you will need to recreate the image or use the OpenStack CLI.
-
Click Create.
Upload image from a URL
In Selectel image storage, an image can be uploaded via a public URL to an image file of a certain size. Learn more about image size limitations in the Limitations section.
Control panel
OpenStack CLI
-
In the control panel, in the top menu, click Products and select Cloud Servers.
-
Go to the Images section.
-
Click Create image.
-
Enter the image name.
-
Select the location to which the image will be uploaded.
Images under 16 GB are automatically replicated to adjacent segments of the location pool.
-
Select an operating system.
-
Select URL as the image source.
-
Enter the link to the image file in the format
https://example.com/file.raw. -
Select an image format or container format. Learn more about formats in the Custom images section.
If you upload an archive with the
.ovacontainer format, we recommend unpacking the archive before uploading so that the image works correctly.If you do not know which formats to specify, specify the image format
raw, container —bare. -
Optional: select 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 required to create a server from this image. For
.isoimages, you cannot specify minimum values.After creating the image, you cannot change the minimum disk and memory size in the control panel. To change the minimum values, you will need to recreate the image or use the OpenStack CLI.
-
Click Create.
Upload vmdk from a file or by link
Learn more about image size limitations in the Limitations section.
Control panel
OpenStack CLI
-
Export the virtual machine from VMware in
.ovfformat. Learn more in the Export an ovf Template guide in VMware documentation.If the virtual disk type is
MONOLITHIC_SPARSEorMONOLITHIC_FLAT, you can skip this step, but we recommend exporting the VM in.ovfformat. -
In the control panel, in the top menu, click Products and select Cloud Servers.
-
Go to the Images section.
-
Click Create image.
-
Enter the image name.
-
Select the location to which the image will be uploaded.
Images under 16 GB are automatically replicated to adjacent segments of the location pool.
-
Select an operating system.
-
Select a file or URL as the image source.
-
If you selected a file, click Upload. If you selected a URL, enter the link to the image file in the format
https://example.com/file.raw. -
Select an image format:
vmdk— if the virtual machine was exported from VMware in.ovfformat or you are uploading a virtual disk of typeMONOLITHIC_SPARSE;raw— if you are uploading a virtual disk of typeMONOLITHIC_FLAT.
-
Select a container format:
ovf— if the virtual machine was exported from VMware in.ovfformat;bare— if you are uploading a virtual disk of typeMONOLITHIC_SPARSEorMONOLITHIC_FLAT.
-
Optional: select 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 required to create a server from this image. For
.isoimages, you cannot specify minimum values.After creating the image, you cannot change the minimum disk and memory size in the control panel. To change the minimum values, you will need to recreate the image or use the OpenStack CLI.
-
Click Create.
Create an image from a disk
See limitations on the size of the disk from which you can create an image.
Control panel
OpenStack CLI
The image creation process depends on the disk type.
Local disk
Network drive
-
If the disk is attached to a cloud server, we recommend turning off the cloud server — creating an image from a running disk may result in an inconsistent image.
-
In the control panel, in the top menu, click Products and select Cloud Servers.
-
Go to the Servers section.
-
In the server menu, select Create local disk image.
-
Enter the image name.
-
Optional: select 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 required to create a server from this image. For
.isoimages, you cannot specify minimum values. -
Click Create.