Migrate cloud server from Servers.ru
- Install the cloud-init agent on the Servers.ru cloud server.
- Get a snapshot of the Servers.ru cloud server.
- Download the Servers.ru snapshot as an image to Selectel.
- Check the integrity of the snapshot image.
- Create a new server from the downloaded snapshot.
- Optional: Change the DNS server addresses.
- Optional: configure network disk backups.
- Optional: configure a global router to link the cloud server with other products and services.
1. Install the cloud-init agent on the cloud server Servers.ru
Ubuntu/Debian
CentOS
Windows
-
Connect to the Servers.ru cloud server.
-
Check the status of the agent:
cloud-init status -
If cloud-init is not installed on the server, install it:
sudo apt update
sudo apt install cloud-init
-
Connect to the Servers.ru cloud server.
-
Check the status of the agent:
cloud-init status -
If cloud-init is not installed on the server, install it:
sudo yum update
sudo yum install cloud-init
-
Connect to the Servers.ru cloud server.
-
Check the status of the agent:
Get-Service -Name "Cloudbase-Init" -
If cloud-init is not installed on the server, install
cloudbase-init, more details on the official cloudbase-init website.
2. Get a snapshot of the cloud server Servers.ru
To get a snapshot from the Servers.ru control panel:
- create and download a snapshot of the server;
- if you can't download the snapshot, transfer the snapshot via a temporary server.
Create and download a snapshot from the Servers.ru control panel
Control panel
OpenStack CLI
-
Authorize in the Servers.ru control panel.
-
Go to Cloud Servers → Create and Manage.
-
Open the page of the desired server.
-
Shut down the server to reduce the chance of data loss when creating a snapshot.
-
Open the Snapshots tab.
-
Click Take a snapshot.
-
Enter the name of the snapshot.
-
Click Take Picture.
-
Wait for the snapshot to be created.
-
Click Download.
-
Open the OpenStack CLI with authorization in Servers.ru.
-
Look up the server ID. To do this, output the list of servers:
openstack server listCopy the server ID.
-
Create a snapshot of the server:
openstack server image create --name <image_name> <server_id>Specify:
<image_name>- snapshot name;<server_id>- The server ID you copied in step 2.
-
Get the snapshot checksum value, it is needed to check the integrity of the snapshot.
4.1 Print the list of snapshots:
openstack image list --privateFrom the response, copy the snapshot ID.
4.2 Get the checksum value. To do this, output the snapshot properties:
openstack image show <image_id>Specify
<image_id>- ID of the snapshot..Save the
checksumvalue, it is specified in thechecksumfield. -
Download the snapshot:
openstack image save --file <file_name> <image_id>Specify:
<file_name>- name of the downloaded file;<image_id>- ID of the snapshot you copied in step 4.1.
Transfer snapshot via temporary server
If you are unable to download the snapshot from the Servers.ru control panel, you can download it as a file via Selectel's temporary server.
-
Authorize in the Selectel control panel.
-
Create a temporary cloud server in the Selectel Control Panel with a disk larger than the snapshot size.
-
Download the snapshot from Servers.ru to a temporary server:
curl -o <file_name> "<snapshot_url>"Specify:
<file_name>- name of the file to which the snapshot will be saved;<snapshot_url>- link to snapshot from Servers.ru control panel.
3. Upload the Servers.ru snapshot as an image to Selectel
If the size of the Servers.ru snapshot is larger than 5 GB, we recommend adding it to the pool via S3. For more details, see Upload image via S3 in the Upload and create image instructions.
Control panel
OpenStack CLI
-
Authorize in the Selectel control panel.
-
From the top menu, click Products and select Cloud Servers.
-
Go to the Images section.
-
Click Create Image.
-
Enter a name for the image.
-
Select the region and pool segment in which to create the server.
-
Select a Linux operating system, even for a Windows server snapshot. This is necessary so that the servers that will be created from this snapshot will boot correctly.
-
If you downloaded the snapshot, select the snapshot file as the image source. If you transferred the snapshot via a temporary server, provide a link to the snapshot file.
-
Click Download.
-
Select qcow2 image format and bare container format . If you do not know which formats to specify, specify raw image format and 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.
-
Once the image is created, you cannot change the minimum disk and memory size in the Control Panel.
-
Check the price of the image.
-
Click Create.
-
Open the OpenStack CLI with Selectel authorization.
-
Download the Servers.ru snapshot as an image to Selectel:
openstack image create --disk-format qcow2 /
--container-format bare /
--property hw_disk_bus=scsi /
--property hw_qemu_guest_agent=yes /
--property hw_scsi_model=virtio-scsi /
--property x_sel_image_agent_type=cloud-init /
--property hw_hardware_type=bios /
--file <file_name> /
<image_name>Specify:
<file_name>- the name of the snapshot file you received in step 2;<image_name>- image name in Selectel.
4. Check the integrity of the snapshot
To make sure that the server snapshot from Servers.ru was downloaded correctly, calculate the file checksum. File checksum is a string of characters that confirms the integrity of the uploaded file.
The method of counting depends on the method you used to get the snapshot in step 2.
Locally
On a temporary server
Linux
macOS
Windows
-
If you downloaded the snapshot through the Servers.ru control panel, calculate the checksum of the snapshot. If you downloaded the snapshot through the OpenStack CLI, skip this step.
1.1 Open the CLI.
1.2 Calculate the checksum of the snapshot file:
md5sum <file_path>Specify
<file_path>- the path to the snapshotfile..1.3 Save the checksum of the snapshot.
-
In the Selectel control panel, click Products in the top menu and select Cloud Servers.
-
Go to the Images section.
-
In the image card, find the MD5 value. The value should match the checksum of the snapshot you saved in step 1.3.
If you downloaded the snapshot in step 2 through the OpenStack CLI, the checksum should match the value you saved in step 4.2.
-
If you downloaded the snapshot through the Servers.ru control panel, calculate the checksum of the snapshot. If you downloaded the snapshot through the OpenStack CLI, skip this step.
1.1 Open the CLI.
1.2 Calculate the checksum of the snapshot file:
md5 <file_path>Specify
<file_path>- the path to the snapshotfile..1.3 Save the checksum of the snapshot.
-
In the Selectel control panel, click Products in the top menu and select Cloud Servers.
-
Go to the Images section.
-
In the image card, find the MD5 value. The value should match the checksum of the snapshot you saved in step 1.3.
If you downloaded the snapshot in step 2 through the OpenStack CLI, the checksum should match the value you saved in step 4.2.
-
If you downloaded the snapshot through the Servers.ru control panel, calculate the checksum of the snapshot. If you downloaded the snapshot through the OpenStack CLI, skip this step.
1.1 Open the CLI.
1.2 Calculate the checksum of the snapshot file:
certutil -hashfile <file_path> MD5Specify
<file_path>- the path to the snapshotfile..1.3 Save the checksum of the snapshot.
-
In the Selectel control panel, click Products in the top menu and select Cloud Servers.
-
Go to the Images section.
-
In the image card, find the MD5 value. The value should match the checksum of the snapshot you saved in step 1.3.
If you downloaded the snapshot in step 2 through the OpenStack CLI, the checksum should match the value you saved in step 4.2.
Linux
Windows
-
Calculate the checksum of the snapshot.
1.1 Connect to the temporary server.
1.2 Calculate the checksum of the snapshot file:
md5sum <file_path>Specify
<file_path>- the path to the snapshotfile..1.3 Save the checksum of the snapshot.
-
In the Selectel control panel, click Products in the top menu and select Cloud Servers.
-
Go to the Images section.
-
In the image card, check the MD5 value. The value should match the checksum of the snapshot you saved in step 1.3.
-
Calculate the checksum of the snapshot.
1.1 Connect to the temporary server.
1.2 Calculate the checksum of the snapshot file:
certutil -hashfile <file_path> MD5Specify
<file_path>- the path to the snapshotfile..1.3 Save the checksum of the snapshot.
-
In the Selectel control panel, click Products in the top menu and select Cloud Servers.
-
Go to the Images section.
-
In the image card, check the MD5 value. The value should match the checksum of the snapshot you saved in step 1.3.
5. Create a server from the added snapshot
- Use the instructions Create a cloud server. Select the source - the server snapshot image from Servers.ru that you downloaded in step 3;
- Optional: delete the snapshot image after creating the cloud server so that you are not charged for storing it.
- Optional: delete the temporary server through which you transferred the snapshot, so that it will not be charged for its use.
6. Optional: change DNS server addresses
Use the Change DNS Servers on Private Subnet and Change DNS Servers on Public Subnet instructions. Enter the Selectel DNS server addresses: 188.93.16.19 and 188.93.17.19.
7. Optional: configure network disk backups
Use the Configure scheduled backups subsection of the Create backups instruction to configure network disk backups.
8. Optional: configure the global router
Use the instructions Link Products and Services via Global Router to set up Cloud Server communication with other Selectel products and services.