Migrating ECS instances may occasionally result in boot failures, such as kernel panics (Linux), blue screen errors (Windows), or INACCESSIBLE_BOOT_DEVICE errors. This topic explains the causes of these issues and provides step-by-step solutions.
Background information
Alibaba Cloud ECS offers a diverse range of instance families and mainstream operating system images, which rely on different underlying virtualization technologies. Drivers must match the virtualization architecture:
Legacy Families (ecs.t1, ecs.s1): Based on Xen virtualization. Images must contain Xen drivers.
KVM Families (e.g., ecs.g5): Based on KVM virtualization. Images must contain virtio drivers.
Shenlong Architecture (e.g., ecs.g7): Based on the proprietary Shenlong architecture. Images must contain optimized virtio drivers.
These drivers are embedded in the operating system kernel. Older kernels may lack the necessary drivers or contain outdated versions incompatible with modern instance families. In such cases, you must manually install or update the drivers.
Pre-migration checklist
System environment exceptions in the source instance can lead to registry corruption, file system errors, or boot failures after migration. To ensure a smooth transition, we recommend the following preparations:
Restart the instance before migration to verify that the operating system and applications boot correctly.
Manually create a snapshot of the instance to back up critical data before initiating migration.
Create a custom image from the source instance and use it to launch a test instance of the target KVM-based family. For details, see Create a custom image from an instance and Create an ECS instance using a custom image.
Incompatibility: Shenlong Architecture vs. Legacy OS
The Shenlong architecture is incompatible with many legacy operating systems due to kernel limitations:
Windows: Windows Server 2003 and earlier. (Windows Server 2008 Standard is supported only if Xen registry keys are cleared).
CentOS / Red Hat: Versions 5.8 and earlier (Kernel 2.6.18-348 or older).
Debian: Versions earlier than 6.09. (Older versions have known KVM compatibility issues; upgrade to 6.09 or higher).
FreeBSD: Versions earlier than 11. (For FreeBSD 11/12, you must install Alibaba Cloud patches. See Support for FreeBSD 11/12 on Alibaba Cloud.
Ubuntu: Versions 10 and earlier. (Ubuntu 12 boots successfully on kernel 3.2).
SUSE Linux Enterprise Server: Versions 10 and earlier.
OpenSUSE: Versions earlier than 13.
Gentoo: Alibaba Cloud Gentoo images support Xen only. For KVM support, upgrade to the latest version.
The list above applies primarily to 6th-generation instances. 7th-generation and newer instances impose stricter compatibility constraints.
Solution 1: Upgrade the OS by replacing the system disk
Legacy operating systems have reached End of Maintenance (EOM) and pose significant security risks. We strongly recommend upgrading to a modern OS. For more information, see Operating system lifecycle.
Alibaba Cloud provides public images for all mainstream Linux and Windows distributions. You can upgrade your instance by replacing the system disk with a new public image. For details, see Overview of public images.
How to migrate data and applications? For detailed instructions, see Replace the operating system.
Recover data.
Detach the old system disk and attach it to the new instance as a data disk to copy your files. For details, see Detach or attach a system disk.
Migrate services and applications.
Reinstall your applications and services on the new system disk.
Move database files and configurations from the attached data disk to the new environment.
Pros & Cons:
Pros: Access to the latest features, security patches, and official support. Easy one-click replacement via the console.
Cons: Requires manual data backup and application redeployment.
Solution 2: Upgrade the OS to the latest minor version
If you cannot replace the OS, update it to the final minor release of its major version (e.g., update CentOS 5 to CentOS 5.11).
Pros & Cons:
Pros: Preserves existing data and application configurations.
Cons: The OS remains End-of-Life (EOL). Security vulnerabilities persist, and modern features (available in CentOS 7/8) remain inaccessible.
Solution 3: Use an earlier-generation instance
If your legacy application requires an older environment, consider downgrading to a 5th-generation instance family that does not rely on the Shenlong architecture (e.g., ecs.n, ecs.xn, ecs.c5). For details, Overview of instance families.
Issue: Virtio driver configuration failure
If the KVM virtio driver is missing or improperly configured, the instance may fail to boot (blue screen on Windows, panic on Linux) after migration. Common causes:
Linux: The
virtiodriver is not installed or configured on Linux.Windows: Drivers failed to install during the ISO phase.
Windows: The Windows registry is corrupted.
Security software: Third-party tools (e.g., 360 Total Security) blocked the driver installation.
Solutions
Linux: If the Linux kernel is corrupted, reinstall the official distribution kernel.
Windows: Contact technical support to attach the WinPE 3.0 ISO. Boot into WinPE and use Device Manager to verify the virtio driver status. If the driver is missing, manually install it within the WinPE environment.
WIndows: Run SFC (System File Checker) to verify system integrity, including the registry. Uninstall third-party security software (antivirus, 360 Total Security) that might interfere with the virtualization driver installation.