All Products
Search
Document Center

Server Migration Center:What do I do if the "Newest installed kernel not in use" error message appears?

Last Updated:Jul 14, 2023

Problem description

The "Newest installed kernel not in use" error message appears when you migrate an operating system.

Cause

If the kernel of the latest version is not set as the default startup kernel in the operating system to be migrated, the operating system may fail to be migrated.

Solution

Change the startup sequence of kernels and set the kernel of the latest version as the default startup kernel. Then, restart the server and run the migration job again.

  1. Connect to the Elastic Compute Service (ECS) instance whose operating system you want to migrate. For more information, see Connect to a Linux instance by using a password or key.

  2. Run the following command to view all installed kernels:

    cat /boot/grub2/grub.cfg | grep menuentry

    A command output similar to the following one is returned. The name of a kernel is enclosed in single quotation marks ('). Example: CentOS Linux (3.10.0-123.9.3.el7.x86_64) 7 (Core).

    image..png
  3. Set the kernel of the latest version as the default startup kernel.

    For example, if CentOS Linux (3.10.0-229.14.1.el7.x86_64) 7 (Core) is the kernel of the latest version, run the following command:

    grub2-set-default 'CentOS Linux (3.10.0-229.14.1.el7.x86_64) 7 (Core)'
  4. Run the following command to check whether the configuration is successful:

    grub2-editenv list

    A command output similar to the following one is returned:

    [root@iZbp1iufd7vqhweezkx**** ~]# grub2-editenv list
    saved_entry=CentOS Linux (3.10.0-229.14.1.el7.x86_64) 7 (Core)
  5. Restart the ECS instance so that it uses the kernel of the latest version as the startup kernel.

  6. Retry the operating system migration job. For more information, see Migrate an operating system.