Skip to content

How do I resolve the "ClientError: BLSC-style GRUB found" error that I receive when I use VM Import/Export in Amazon EC2?

2 minute read
3

I want to use VM Import/Export to import a virtual machine (VM) image to Amazon Elastic Compute Cloud (Amazon EC2) or export an Amazon Machine Image (AMI). The image is from Red Hat Enterprise Linux (RHEL) 8, CentOS 8, or Oracle Linux 8. However, I receive the "ClientError: BLSC-style GRUB found, but unable to detect default kernel" error.

Short description

The "ClientError: BLSC-style GRUB found" error occurs if VM Import/Export can't detect the default kernel in your VM image.

To use VM Import/Export in Amazon EC2, you must set the GRUB_ENABLE_BLSCFG parameter in the /etc/default/grub file to false. By default, GRUB_ENABLE_BLSCFG is set to true. If the parameter is true, then GRUB2 uses blscfg files and entries from the /boot/loader file instead of menuentry entries from the grub.cfg file. As a result, you receive the "ClientError: BLSC-style GRUB found" error message.

The "ClientError: BLSC-style GRUB found" error also occurs if you use an unsupported kernel.

Resolution

Prerequisites: Confirm that you use supported operating system (OS) and kernel versions.

If you use a supported OS and kernel and still receive the "ClientError: BLSC-style GRUB found" error message, then complete the following steps:

  1. Open the /etc/default/grub file with a text editor such as vi.
    Example command:

    sudo vi /etc/default/grub
  2. Set the GRUB_ENABLE_BLSCFG parameter to false.
    Example text:

    GRUB_ENABLE_BLSCFG=false
  3. Run the following command to rebuild the GRUB configuration file:

    grub2-mkconfig -o /boot/grub2/grub.cfg
  4. Test the VM to ensure that it still works on premises. Then, import the new VM image, or export the AMI.

  5. (Optional) Set the parameter back to true after you import the new image or export the AMI.

AWS OFFICIALUpdated 2 months ago
2 Comments

Thanks. I had this issue today and the solution provided here worked!

AWS
replied 2 years ago

Article says to set this value to false

  • GRUB_ENABLE_BLSC

But my grub file has

  • GRUB_ENABLE_BLSCFG

I wasn't sure if I should add the first param or edit the one that was a close match. I set the close match "GRUB_ENABLE_BLSCFG" to false and now I'm able to export my ami

replied 2 years ago