Migrating Servers Running Unsupported Linux OSs
This practice walks you through how to migrate servers running unsupported Linux OSs. You can check whether your source OSs are supported by SMS in Supported Linux OSs.
Procedure
- Check the format of the system partition on the source server to be migrated.
sudo parted -l /dev/vda | grep 'Partition Table'
- If msdos is displayed, the partition uses MBR, and you can continue to the next step.
- If gpt is displayed, the partition uses GPT. This solution does not work, and you need to find another way.
- Run df -TH to view the disk information. As shown in the following figure, /dev/vda1 is the system partition.
- Obtain the UUID of the system partition.
sudo blkid /dev/vda1
- Use vi to open /etc/fstab. Press i to enter editing mode and add the UUID obtained in Step 3 to the end of the file.
vi /etc/fstab
- Save the file and exit.
:wq
- Install the qemu-img tool.
CentOS is used as an example.
yum -y install qemu-img
- Export /dev/vda to /mnt/vdb/test.qcow2.
sudo qemu-img convert -f raw -O qcow2 /dev/vda /mnt/vdb/test.qcow2
In this command, /mnt/vdb is the data disk or other storage where the image will be created. To export the partition to another format, you can change the value of the -O option.
Example Value
Description
qcow2
QCOW2 format
vhd
VHD format
vmdk
VMDK format
raw
Raw image format
- Use OBS Browser+ to upload the image file to an OBS bucket on Huawei Cloud and register the image file as a private image. For details, see Registering the Image File as a Private Image.
- Create an ECS from the registered private image. For details, see Creating an ECS from an Image.
- Create images for data disks on the source server by repeating Step 2 to Step 8.
- On the IMS console, create data disks using the data disk images.
- Attach the created data disks to the ECS by referring to Attaching an EVS Disk to an ECS.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.