If your server uses an early operating system version or is not in the applicable list, you can contact Server Migration Center (SMC) technical support for migration solutions.
Migration solutions for servers with early operating system versions
You cannot migrate servers with early operating system versions such as versions earlier than CentOS 5.5 and Red Hat 5.5 to Alibaba Cloud. Their kernels do not support the necessary virtualization drivers such as VirtIO. This topic uses a server with CentOS 5.1 (kernel version is 2.6.18-53.el5) as an example to describe how to upgrade the operating system to CentOS 5.5 (kernel version to 2.6.18-194.el5) and migrate the server to Alibaba Cloud.
- Run the following commands to ensure that the operating system version is CentOS 5.1
and the kernel version is 2.6.18-53.el5:
cat /etc/redhat-release uname -r
- Run the following commands to download and install CentOS 5.5:
wget http://vault.centos.org/5.5/os/x86_64/CentOS/kernel-2.6.18-194.el5.x86_64.rpm rpm -ivh ./kernel-2.6.18-194.el5.x86_64.rpmNote If an error is prompted during installation, check the error log. If the error occurs because of conflicts between the original software version and the new kernel, manually uninstall the original software and re-install the new kernel. After the new kernel is installed, install the original software back.
- Upgrade GRUB to v1.99. For more information, see Install GRUB in a Linux server.
Note We recommend that you hide the GRUB v0.97 so that you do not mistake it for the new version.
- Use GRUB v1.99 as follows:
- Run the
grub-mkconfig -o /boot/grub/grub.cfgcommand to update the GRUB configuration file.
- Run the
cat /boot/grub/grub.cfgcommand to check whether the old kernel (2.6.18-53.el5) and the new kernel (2.6.18-194.el5) are contained in the configuration file.
- Run the fdisk -l command to find the system disk.
- If the device name of your system disk is /dev/sda, run the
grub-install --no-floppy --modules=part_msdos --boot-directory=/boot /dev/sdacommand.
- Run the
cat /boot/grub/grub.cfg |grep menuentrycommand to view the startup item list.
- Find the label of the new kernel and run the following commands to set the new kernel
as a default startup item:
mkdir /usr/local/etc/default/ -p echo "GRUB_DEFAULT=<Label of the new kernel>" >> /usr/local/etc/default/grub grub-mkconfig -o /boot/grub/grub.cfgFor example, if the new kernel is GNU/Linux, with Linux 2.6.18-194.el5 and the corresponding label is 2, the commands are:
mkdir /usr/local/etc/default/ -p echo "GRUB_DEFAULT=2" >> /usr/local/etc/default/grub grub-mkconfig -o /boot/grub/grub.cfg
- Run the
- Restart the operating system. The GRUB menu page is displayed and the system is restarted using the new kernel 2.6.18-194.el5.
- After the preceding operations are complete, download and install the Cloud Migration tool to migrate your server. For more information, see Migrate your server to Alibaba Cloud by using the Cloud Migration tool.
Migration solutions for servers with other operating systems
- Upgrade GRUB to v2.02 or later for Amazon Linux operating systems. For more information, see Install GRUB in a Linux server.
- If your operating system is not in the applicable list, such as XenServer, contact SMC technical support for system testing and migration solutions as needed. For more information, see Supported systems and scopes of migration and Contact us.