Bobcares

Hyper-V Boot Error: The Image’s Hash and Certificate Are not Allowed

by | Nov 22, 2020

The Hyper-V Boot Error: ‘The Image’s Hash and Certificate Are not Allowed’ occurs while trying to install Linux CentOS on a virtual machine running on a Hyper-V server.

Here at Bobcares, we have seen several such Hyper-V-related errors as part of our Server Management Services for web hosts and online service providers.

Today we’ll take a look at the causes for this error and see the fix.

 

Why the image’s hash and certificate are not allowed

Generally, this error occurs while trying to install Linux CentOS on a virtual machine running on a Hyper-V server.

The main reason for this error to occur is that the Hyper-V by default uses UEFI with Secure Boot mode enabled for its Generation 2 virtual machines.

Secure Boot prevents the boot from an untrusted Linux bootloader in the ISO file. Thus this error occurs. For instance, the error appears as below.

the image’s hash and certificate are not allowed

 

How we resolve the error ‘image’s hash and certificate are not allowed’

Now let’s take a look at the steps our Support Engineers follow to resolve this error.

First, to start the installation, we disable Secure Boot in the virtual machine settings (Settings >> Security >> uncheck the option Enable Secure Boot).

Or else we can leave Secure Boot enabled. But we prefer using Microsoft UEFI Certificate Authority template instead of Microsoft Windows. Because according to Microsoft, this template allows you to run Linux distros in the Secure Boot compatibility mode.

Then we restart the VM and boot it again from the CentOS installation ISO image or another Linux distribution.

 

In the same way, we manage the Secure Boot and templates setting of VM using PowerShell. We run the below command to get the current VM firmware settings.

Get-VMFirmware -VMName “centos7”

Here is the command we use to disable Secure Boot mode for the VM:

Set-VMFirmware -VMName “centos7” -EnableSecureBoot Off

Finally, in order to change the bootloader certificate validation template to the one compatible with most Linux distros:

Set-VMFirmware -VMName “centos7” -EnableSecureBoot On -SecureBootTemplate “MicrosoftUEFICertificateAuthority”

[Need any further assistance in fixing Hyper-V errors? – We are here to help you]

 

Conclusion

In short, this error occurs while trying to install Linux CentOS on a virtual machine running on a Hyper-V server. Today, we saw the solution provided by our Support Engineers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

4 Comments

  1. Fanuel

    Or else we can leave Secure Boot enabled. But we prefer using Microsoft UEFI Certificate Authority template instead of Microsoft Windows. Because according to Microsoft, this template allows you to run Linux distros in the Secure Boot compatibility mode.

    This is what helped me. I think many new linux users will benefit from your help . Much appreciated

    Reply
    • Hiba Razak

      Thanks for the feedback.

      Reply
  2. Ricardo

    Great!

    Reply
  3. diego

    Muchas Gracias

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.