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 repeat the web server startup. More details on installing Python can be found in the Downloading Python section of the official Python documentation.
-
Open the
http://<ip_address>:80page in your browser.Specify
<ip_address>— public IP address of the cloud server. You can copy it in the control panel: click Products → Cloud Servers in the top menu → Server page → Ports tab → click in the port card 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 Servers.ru server snapshot is larger than 5 GB, we recommend adding it to a pool via S3. Read more in the Upload image via S3 subsection of the Upload and create image guide.
Control panel
OpenStack CLI
-
Log in to the Selectel control panel..
-
Click Products in the top menu 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, specify the link to the snapshot file that you saved in step 9.
-
Click Upload.
-
Select qcow2 as the image format and bare as the container format. If you are unsure which formats to specify, use the raw image format and bare as the container format.
-
Optional: select the Specify minimum disk and RAM size check box and indicate the RAM capacity 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 Servers.ru snapshot was uploaded correctly, calculate the file checksum. The file checksum is a string of characters verifying the integrity of the uploaded file.
The calculation method depends on how you obtained 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 checksum. If you downloaded the snapshot via 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>— path to the snapshot file.1.3. Save the snapshot checksum.
-
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 must match the snapshot checksum you saved in step 1.3.
If you downloaded the snapshot in step 2 via OpenStack CLI, the checksum must match the value you saved in step 4.2.
5. Create a server from the added snapshot
- Use the Create a cloud server instructions. Choose the image of the servers.ru snapshot as the source, which 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 you used to transfer the snapshot to avoid being charged for its usage.
6. Optional: change DNS server addresses
Use the Change DNS servers in a private subnet and Change DNS servers in a public subnet guides. Enter the Selectel DNS server addresses: 188.93.16.19 and 188.93.17.19.
7. Optional: configure network volume backups
Use the Schedule backups subsection of the Create backups guide to configure network volume backups.
8. Optional: configure a global router
Use the Connect products and services via global router guide to configure the connection between a cloud server and other Selectel products and services.