Migrate a cloud server from Servers.ru
Before migrating, see how cloud servers work in the Cloud Servers product description.
- Install the cloud-init agent on a Servers.ru cloud server.
- Get a snapshot of a Servers.ru cloud server.
- Upload the Servers.ru server snapshot as an image to Selectel.
- Check the snapshot image integrity.
- Create a new server from the uploaded snapshot.
- Optional: change DNS server addresses.
- Optional: configure network volume backups.
- Optional: configure a global router to connect your cloud server to other products and services.
1. Install the cloud-init agent on a Servers.ru cloud server
Ubuntu/Debian
CentOS
Windows
-
Connect to the Servers.ru cloud server.
-
Check the agent status:
cloud-init status -
If cloud-init is not installed on the server, install it:
sudo apt updatesudo apt install cloud-init
2. Get a snapshot of a Servers.ru cloud server
To get a snapshot from the Servers.ru control panel:
- create and download the server snapshot;
- if you cannot 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
-
Log in to the Servers.ru control panel..
-
Go to Cloud Servers → Create and manage.
-
Open the page of the required server.
-
Shut down the server to reduce the risk of data loss when creating a snapshot.
-
Open the Snapshots tab.
-
Click Take snapshot.
-
Enter a snapshot name.
-
Click Take shot.
-
Wait for the snapshot to be created.
-
Click Download.
Transfer snapshot via a temporary server
If you cannot download the snapshot from the Servers.ru control panel, you can upload it as a file via a temporary Selectel server.
-
Log in to 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 the temporary server:
curl -o <path_to_file> "<snapshot_url>"Specify:
<path_to_file>— the path to the file including the filename where the snapshot will be saved. We recommend creating a separate directory to save the snapshot to;<snapshot_url>— link to the snapshot from the Servers.ru control panel.
-
Go to the directory where you downloaded the snapshot in step 4.
-
Start the web server:
python3 -m http.server 80If Python is not installed on the server OS, install it and restart the web server. For more information on installing Python, see the Downloading Python section of the official Python documentation.
-
Open the
http://<ip_address>:80page in your browser.Enter
<ip_address>— the public IP address of the cloud server. You can copy it in the control panel: from the top menu, click Products → Cloud Servers → server page → Ports tab → in the port card, click next to the public IP address. -
On the page, click the snapshot.
-
Copy and save the snapshot link from the address bar.
3. Upload the Servers.ru server snapshot as an image to Selectel
If the size of the Servers.ru server snapshot exceeds 5 GB, we recommend adding it to the pool via S3. For more details, see the Upload image via S3 section of the Upload and create image instruction.
Control panel
OpenStack CLI
-
Log in to the control panel Selectel.
-
In the top menu, click Products and select Cloud Servers.
-
Go to the Images section.
-
Click Create image.
-
Enter an image name.
-
Select the region and pool segment where the server will be created.
-
Select the Linux operating system, even if the snapshot is of a Windows server. This is necessary to ensure that servers created from this snapshot boot correctly.
-
Upload the image:
- if you downloaded the snapshot in step 2, select the snapshot file as the image source;
- if you transferred the snapshot via a temporary server in step 2, enter the link to the snapshot file that you saved in step 9.
-
Click Upload.
-
Select the image format qcow2 and the container format bare. If you do not know which formats to specify, use the image format raw and the container format 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.
-
You cannot change the minimum disk and memory requirements in the control panel once the image is created.
-
Check the image price.
-
Click Create.
4. Check the snapshot integrity
To ensure that the snapshot from the Servers.ru server has loaded correctly, calculate the file's checksum. A file checksum is a string of characters that confirms the integrity of the downloaded file.
The calculation method depends on the method you used to obtain the snapshot in step 2.
Locally
On a temporary server
Linux
macOS
Windows
-
If you downloaded the snapshot via the Servers.ru control panel, calculate the snapshot's checksum. If you downloaded the snapshot via the OpenStack CLI, skip this step.
1.1. Open the CLI.
1.2. Calculate the checksum of the snapshot file:
md5sum <file_path>Enter
<file_path>— the path to the snapshot file.1.3. Save the snapshot checksum.
-
In the Selectel control panel, from the top menu, click Products and select Cloud Servers.
-
Go to the Images section.
-
In the image card, find the MD5 value. The value must match the snapshot checksum that you saved in step 1.3.
If you downloaded the snapshot in step 2 via OpenStack CLI, the checksum must match the value that you saved in step 4.2.
5. Create a server from the added snapshot
- Use the Create a cloud server instruction. Select the source — the Servers.ru server snapshot image that you uploaded in step 3;
- Optional: delete the snapshot image after creating the cloud server to avoid being charged for its storage.
- Optional: delete the temporary server used to transfer the snapshot to avoid being charged for its use.
6. Optional: change DNS server addresses
Use the Change DNS servers in a private subnet and Change DNS servers in a public subnet instructions. Enter the Selectel DNS server addresses: 188.93.16.19 and 188.93.17.19.
7. Optional: configure network volume backups
Use the Configure scheduled backups subsection of the Create backups instruction to set up network volume backups.
8. Optional: configure a global router
Use the Connect products and services via Global Router instruction to connect your cloud server to other Selectel products and services.