Environment migration requirements may cause instances to experience kernel panic errors, blue screen errors, or INACCESSIBLE_BOOT_DEVICE errors after migration. This topic describes how to resolve these issues.
Background information
Alibaba Cloud ECS provides a wide array of instance families and mainstream operating system images. Different instance types are based on different virtualization technologies:
The retired ecs.t1 and ecs.s1 instance families are based on Xen virtualization technology and require images to contain specific drivers such as Xen drivers.
The ecs.g5 instance family is based on Kernel-based Virtual Machine (KVM) virtualization technology and requires images to contain the virtio driver.
The ecs.g7 instance family is based on SHENLONG architecture and requires images to contain the virtio driver.
The preceding drivers are provided by image kernels. The instance types supported by the drivers vary based on kernel versions. The kernels of specific early operating system versions may not contain these drivers. For these operating system versions, you must manually install the drivers. The drivers in the kernels of early operating system versions may be incompatible with later-generation instance types.
Precautions for migration
If your instance encounters a system environment exception, issues may occur after the instance is migrated. For example, the registry or file systems of the instance may be damaged, or the instance may be unable to start. To ensure that an instance can be migrated and run as expected after migration, we recommend that you make preparations before you migrate the instance.
Before you migrate the instance, we recommend that you restart it to ensure that its operating system and business are normal.
Before you migrate the instance, we recommend that you create snapshots for it to back up important data.
You can also create custom images from the instances that you want to migrate and use the custom images to create instances of KVM-based instance types. For more information, see Create a custom image from an instance and Create an ECS instance using a custom image.
A SHENLONG environment is incompatible with an early operating system version
The known legacy operating systems are as follows:
Windows Server 2003 and earlier. Windows Server 2008 Standard supports SHENLONG environments on the premise that Xen registry information is cleared.
CentOS 5.8 and earlier and Red Hat 5.8 and earlier, including other CentOS and Red Hat versions that are based on the CentOS 5 or Red Hat 5 kernel 2.6.18-348 or earlier.
Debian versions earlier than 6.09. Debian versions earlier than 6.09 may be incompatible with KVM. We recommend that you upgrade to Debian 6.09 or later.
FreeBSD versions earlier than 11. For FreeBSD 11 and 12, install patches provided by Alibaba Cloud. For more information, see Support for FreeBSD 11/12 on Alibaba Cloud.
Ubuntu 10 and earlier. Ubuntu 12 can start based on kernel 3.2. No public images that contain Ubuntu versions earlier than 12 have ever been provided by Alibaba Cloud.
SUSE Linux Enterprise Server 10 and earlier. No public images that contain SUSE Linux Enterprise Server versions earlier than 11 have been provided by Alibaba Cloud.
OpenSUSE versions earlier than 13. No public images that contain OpenSUSE versions earlier than 13 have been provided by Alibaba Cloud.
Gentoo. The Gentoo operating systems provided by Alibaba Cloud support only Xen. If you want the Gentoo operating systems to support KVM, we recommend that you upgrade to the most recent Gentoo version. Alibaba Cloud has not provided Gentoo operating systems since 2016.
The preceding operating system versions are incompatible with SHENLONG environments for 6th-generation instance types. Instance types of the 7th or later generations have more compatibility constraints.
Solution 1: Upgrade the operating system by replacing the system disk
The preceding early operating system versions reached end of maintenance (EOM) and end of update long ago. They are vulnerable to a variety of functionality and security risks. We recommend that you upgrade your operating systems at the earliest opportunity. For more information, see Operating system lifecycle.
Alibaba Cloud provides public images for mainstream Linux distributions and Windows versions. For more information, see Overview of public images.
You can upgrade the operating system of an instance by replacing the instance system disk with a few clicks. For more information, see Replace the operating system.
Copy data from the original system disk.
Detach the system disk from the instance, attach it to a different instance as a data disk, and then copy data from the disk. For more information, see Detach or attach a system disk.
Migrate services and applications from the original system disk.
Deploy the services that were deployed on the original system disk to the new system disk.
Migrate applications such as databases from the original system disk to the new system disk.
This solution has the following benefits and drawbacks:
Benefits: This solution is easy to use. You can select an appropriate image from a wide variety of Alibaba Cloud public images and switch to a more recent operating system version by replacing the instance system disk.
Drawbacks: You must back up data from the original system disk and redeploy some applications and services to the new system disk.
Solution 2: Upgrade to the most recent minor release of the current operating system version
You can upgrade the operating system of your instance to the most recent minor release. For example, you can upgrade CentOS 5 to CentOS 5.11. For more information, see the following topics:
This solution has the following benefits and drawbacks:
Benefits: The upgrade does not affect the data and services in the original operating system.
Drawbacks: If you upgrade your instance operating system (such as CentOS 5) to a more recent minor release (such as CentOS 5.11) that is no longer maintained and updated, vulnerabilities and risks remain in the operating system and you have no access on the instance to the new features provided by more recent operating system versions (such as CentOS 7 and 8).
Solution 3: Use an earlier-generation instance type
You can use a 5th-generation instance type that is not based on SHENLONG environments. Example: an ecs.n, ecs.xn, or ecs.c5 instance type. For more information, see Overview of instance families.
The virtio driver failed to be installed or configured
If the virtio driver is not installed or configured on an instance after the instance is migrated, a downtime or blue screen error may occur. Possible causes:
The virtio driver is not installed or configured on Linux.
The driver failed to be installed on instance startup.
The Windows registry is damaged.
Security software such as 360 is installed on Windows.
Solutions
If the kernel is damaged, re-install the official kernel.
For a Windows instance, contact Alibaba Cloud technical support to attach the Winpe 3.0 ISO. After the Winpe environment starts, use Device Manager to check the virtio driver. If the driver is not installed or damaged, install it manually.
Before you migrate a Windows instance, we recommend that you use the System File Checker (SFC) to verify system integrity (including registry integrity) and uninstall third-party security software that may interfere with the migration, such as 360 Total Security.