Skip to main content

Migrate servers using images

You can migrate servers to Selectel from RAW, VMware, Hyper-V images and Windows backups.

If servers run in virtual machines with another provider or on your own hypervisor, it is convenient to migrate them using disk images: the server is migrated entirely, without reinstalling the OS and software. Images can be deployed on cloud servers.

What is migratedHow to prepare an image
Physical or virtual Linux serverCreate a RAW disk image
VMs on VMware, Hyper-V, Proxmox, and other hypervisorsExport the VM disk and convert it if necessary
Windows ServerCreate a full backup (Windows Server Backup)
Infrastructure with VeeamCreate a backup and restore via Veeam Agent

Migrate a RAW disk image

A RAW image is an exact byte-for-byte copy of a disk. You can upload it to Selectel and create a cloud server from it.

  1. Boot the source server into Rescue mode so that data on the disk does not change during copying.

  2. Create a disk image using the dd utility:

    dd if=/dev/<disk_name> of=<image_path> bs=32M conv=sparse status=progress

    Specify:

    • <disk_name> — name of the disk you are copying;
    • <image_path> — path to the image file. It must be located on another disk — external or additional. To avoid typing a long path, go to the root of this disk using cd and run dd from there;
    • conv=sparse — option to avoid writing zero blocks to the file. The image will take up as much space as the actual data on the disk. If there is enough space, you can omit this parameter.
  3. If there is no separate disk, you can send the image directly over the network to another server:

    dd if=/dev/<disk_name> bs=32M status=progress | ssh user@<storage_host> "dd of=<image_path> bs=32M conv=sparse"

    Specify:

    • <disk_name> — name of the disk you are copying;
    • <storage_host> — host of the other server;
    • <image_path> — path to the image file.
  4. Upload the image to Selectel in raw format. Upload images larger than 30–40 GB via the OpenStack CLI:

    openstack image create --disk-format raw --container-format bare \
    --file image.img my-server-image
  5. Create a cloud server from the image and check its operation.

Export and convert a VM disk

  1. For the source Windows VM, install the latest stable version of VirtIO drivers virtio-win.iso. Windows does not have built-in support for VirtIO paravirtualization, and without these drivers, the OS will not boot in Selectel.

    Modern Linux distributions already support VirtIO drivers and usually boot in the cloud without modifications.

  2. Convert VM disks from other hypervisors using the qemu-img utility:

    2.1. Open the CLI.

    2.2. Convert the disk format:

    qemu-img convert -p -f vmdk -O qcow2 disk.vmdk disk.qcow2

Migrate a Windows server from a backup

  1. On the source server, create a full backup using one of the following methods:

    • open the Windows Server Backup snap-in, select Backup Once → Entire Server;

    • run the command in the command line:

      wbadmin start backup -backupTarget:E: -allCritical -vssFull -quiet
  2. Create a bucket in Selectel S3.

  3. Create a service user with access to the S3 bucket.

  4. Install and configure rclone.

    Connection example in rclone.conf
    [selectel]
    type = s3
    provider = Other
    access_key_id = ACCESS_KEY
    secret_access_key = SECRET_KEY
    endpoint = https://s3.ru-1.storage.selcloud.ru
    region = ru-1
  5. Upload the backup to the S3 bucket using rclone:

    rclone copy E:\WindowsImageBackup selectel:migration-backup/WindowsImageBackup --progress --transfers 8
  6. On the new server, boot from the Windows Server installation image.

  7. Select Repair your computer → System Image Recovery.

  8. Specify the path to the backup.

Migrate infrastructure via Veeam Agent

If you already use Veeam, you can migrate infrastructure via Veeam Agent for Windows or Veeam Agent for Linux. The agent creates a full backup of the server and can restore it to different hardware (bare-metal restore). This method is suitable for cases where servers run on Hyper-V or Proxmox rather than VMware.

For more information, see the Connect agent backup instructions.