Transfer a Cloud Server to Another Pool Segment, Project, and/or Account
To transfer a cloud server, you need to create an image of its bootable volume, transfer this image, and create a new server from it. A server cannot be transferred directly.
You can transfer a cloud server to another pool segment , Cloud platform project , and/or account. For example, you can transfer a server from the ru-1a pool segment to ru-7a in another account, or transfer a server to another project within the account, while leaving it in the current pool segment.
When transferring a cloud server, its IP address is not saved. If you need to transfer the server along with its IP address, you can transfer the entire project to another account. To do this, please create a ticket .
Check which volume is bootable on the cloud server .
Create an image of the bootable volume of your cloud server .
Transfer the image to the pool segment, project, and/or account to which you want to transfer the cloud server .
Create a cloud server from the bootable volume image . If the image is larger than 50 GB, you must first create a volume from it, and then create the server from that volume.
If additional volumes are used on the original server, transfer them and connect them to the new server .
Check Bootable Volume
From the Control panel , go to the Cloud platform ⟶ Servers section.
Open Servers ⟶ server page.
If the server has a bootable local disk, open the Configuration tab. The Local disk field must be present on the tab.
If the server has a bootable network volume, open the Network volumes tab. Check which volume is bootable — there must be a Bootable tag in the line with the bootable volume.
Create an Image of the Bootable Volume
Control panel
OpenStack CLI
From the Control panel , go to the Cloud platform ⟶ Images section.
Click Create image .
Enter the image name.
Select the pool segment in which your cloud server is located. The image will be uploaded to the same pool segment. Images smaller than 16 GB are automatically replicated to neighboring segments of the pool.
Select the volume as the image source.
Select the bootable volume of your cloud server. Make sure that you create an image from the bootable volume .
Optional: check the There are requirements for a volume size and RAM checkbox. Specify the minimum amount of RAM in MB and volume size in GB. When creating a cloud server from this image, the Control panel or API will automatically check these requirements.
Click Create .
Open OpenStack CLI .
If the bootable volume is local, create an image from the cloud server local disk (you don’t need to perform any further steps):
openstack server image create --name <image_name> <server>
Specify:
<image_name>
— the name of the new image;
<server>
— server name or ID, you can see it with openstack server list
If the network volume is the bootable one, stop the server:
openstack server stop <server>
Specify <server>
— server name or ID, you can see it with openstack server list
Detach the volume from the server:
openstack server remove volume <server> <volume>
Specify <volume>
— bootable volume name or ID, you can see it with openstack volume list
. Make sure you are creating an image from the bootable volume .
Make sure the volume is in AVAILABLE status:
openstack volume list
Create an image from the network bootable volume:
openstack image create --volume <volume> <image_name>
Specify <image_name>
— the name of the new image;
Transfer Image
You can transfer an image to another pool segment , Cloud platform project , and/or account.
For example, you can transfer an image from the ru-1a pool segment to ru-7a in another account, or transfer a server to another project within the account, while leaving it in the current pool segment.
Control panel
OpenStack CLI
From the Control panel , go to the Cloud platform ⟶ Images section.
From the (
) menu of the bootable volume image, select Copy image’s URL .
Make sure you are in the account and project you want to transfer the server to. Click on the name of the current project and select the desired project.
Click Create image .
Enter the image name.
Select the pool segment in which you want to transfer your cloud server. The image will be transferred to the same pool segment.
Select the URL as the image source.
Insert the image URL that you copied in step 2.
Select the image format and the container format.
If you aren’t sure what formats to specify, specify raw
for images and bare
for containers.
Select the OS.
Optional: check the There are requirements for a volume size and RAM checkbox. Specify the minimum amount of RAM in MB and volume size in GB. When creating a cloud server from this image, the Control panel or API will automatically check these requirements.
Click Create .
From the Control panel , go to the Cloud platform ⟶ Images section.
From the (
) menu of the bootable volume image, select Copy image’s URL .
Open OpenStack CLI .
Create an image:
glance image-create-via-import \
--import-method web-download \
--uri <uri_image> \
--name <image_name> \
--disk-format <disk_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:
<uri_image>
— URL of the image you copied in step 2;
<image_name>
– image name;
<disk_format>
— volume (image) format. If you aren’t sure what formats to specify, specify raw
;
<container_format>
— container format . If you aren’t sure what formats to specify, specify bare
;
<pool_segment>
— pool segment to which you want to transfer the cloud server, for example ru-1a. The image will be transferred to the same pool segment. Images smaller than 16 GB are automatically replicated to neighboring segments of the pool.
Create a Cloud Server
If the image size is less than 50 GB, you can create a cloud server directly from the bootable volume image.
If the image size is larger than 50 GB, we recommend creating the volume from the image first, and then create the server from that volume. By doing this, you will be able to avoid the error when creating a server.
Control panel
OpenStack CLI
If the bootable volume image is larger than 50 GB, create a volume from the image .
From the Control panel , go to the Cloud platform ⟶ Servers section.
Click Create server .
Enter the cloud server name. It will be set as hostname in the server OS.
Select the pool segment to which you transferred the bootable volume image.
Click Choose another source :
if the image size is less than 50 GB, open the My images tab. Select the image of the bootable volume that you created earlier ;
if the image is larger than 50 GB, open the Volumes tab. Select the volume created from the bootable volume image.
Click Select .
Choose the cloud server configuration. There are two types of configurations:
fixed — server lines with different ratios of vCPU and RAM up to 36 vCPUs and 128 GB of RAM;
custom — free choice of resource ratio.
The amount of RAM that is allocated to the server may be less than the specified amount — the operating system kernel reserves some RAM depending on the kernel version and distribution. You can check the allocated capacity on the created server with sudo dmesg | grep Memory
Select the server’s bootable volume. You can select:
Optional: to add an additional volume to the server, click Add another network volume . You can add multiple volumes.
You can transfer additional volumes that were attached to the original server.
Select or create a subnet to which the server will be connected:
private subnet — a subnet with no Internet access;
public subnet — all subnet addresses will be accessible from the Internet;
a private subnet with a public IP address — a private subnet and one static public IP address.
Save the root
user password (a user with unrestricted rights to all actions on the system) to connect to the server.
Optional: upload an SSH key for a more secure connection to the server.
Optional: to create a preemptible server, check the Preemptible server checkbox.
We do not guarantee hosting servers on different hosts. If you plan to create multiple servers, we recommend using colocation groups or placing cloud servers in different pools to improve infrastructure reliability.
Optional: to increase the fault tolerance of your infrastructure, create a placement group.
Optional: in the User data field, insert a script that will be executed when the system boots. Examples of scripts and supported formats can be found in the Add user data instructions.
Click Create .
If the bootable volume image is larger than 50 GB, create a volume from the image .
Open OpenStack CLI .
Create a cloud server:
openstack server create \
[--image <image> | --volume <volume> ]
--flavor <flavor> \
--availability-zone <pool_segment> \
--nic net-id=<net_uuid> \
--block-device-mapping vdb=<extra_volume_name> \
<server_name>
Specify:
source type:
--image <image>
— if the size of the bootable volume image you created earlier is less than 50 GB. The <image>
parameter is the image name or ID. The list can be viewed with openstack image list
--volume <volume>
— if the size of the bootable volume image you is less than 50 GB. The <volume>
parameter is the name or ID of the volume created from the bootable volume image. The list can be viewed with openstack volume list
--flavor <flavor>
— the name or ID of the server flavor (configuration). The list can be found with openstack flavor list
--availability-zone <pool_segment>
— pool segment in which you have transferred the bootable volume image, for example ru-1a;
--nic net-id=<net_uuid>
— optional: the ID of private or public network, to which the server will be connected. The list can be viewed with openstack network list
--block-device-mapping vdb=<add_volume_name>
— optional: the name of the additional volume. The list can be viewed with openstack volume list
--tag preemptible --os-compute-api-version 2.72
— optional: add a tag to create a preemptible server;
--user-data <user_data.file>
— optional: add a file with a script which will run when the system boots;
<server_name>
— the server name.
Transfer Additional Volumes
If additional volumes are used on the source cloud server, you can transfer them.
Create images of additional volumes .
Transfer the additional volume images to the pool segment, project, and/or account to which you transferred the cloud server .
Create network volumes from the images .
Connect the network volumes to the new cloud server .