8

I'm trying to install CentOS 7 using Hyper-V and it's failing with the following error message:

tsc: Fast TSC calibration failed
PCI: Fatal: No config space access function found
i8042: No controller found

[long waiting period...]

dracut-initqueue[475]: Warning: Could not boot.
dracut-initqueue[475]: Warning: /dev/disk/by-label/CentOS-7-livecd-x86_64 does not exist
dracut-initqueue[475]: Warning /dev/mapper/live-rw does not exist
Warning: /dev/disk/by-label/CentOS-7-livecd-x86_64 does not exist
Warning: /dev/mapper/live-rw does not exist

Generating "/run/initramfs/rdsosreport.txt"

I have created a Generation 2 virtual machine and disabled Secure Boot so it would at least start booting.

3 Answers 3

7

CentOS 7 currently does not support running on Hyper-V Generation 2 virtual machines, as can be seen here. You have to recreate the VM and specify Generation 1 as the VM type.

Linux Virtual Machines on Hyper-V provides a comprehensive list of which distributions are supported and any limitations associated with them.

For a list of the differences between Gen1 and Gen2 virtual machine, check this page. You'll notice Legacy BIOS is gone in favor of UEFI.

1
  • I've ran RHEL/CentOS/Oracle Linux as a Gen2 VM since 7.0 Beta. Before 7, then yea stick with gen 1, but why run anything that archaic anyways. The link that was provided if read towards the bottom #14. I believe states: Generation 2 virtual machines have secure boot enabled by default and Generation 2 Linux virtual machines will not boot unless the secure boot option is disabled. You can disable secure boot in the Firmware section of the settings for the virtual machine in Hyper-V Manager or you can disable it using Powershell:
    – Brad
    Jan 24, 2016 at 3:00
6

You don't need to switch back to a Generation 1 virtual machine. You can use a Generation 2 virtual machine, so long as you disable Secure Boot.

To quote from Microsoft:

Generation 2 virtual machines have secure boot enabled by default and Generation 2 Linux virtual machines will not boot unless the secure boot option is disabled. You can disable secure boot in the Firmware section of the settings for the virtual machine in Hyper-V Manager or you can disable it using Powershell:

Set-VMFirmware –VMName "VMname" -EnableSecureBoot Off

Supporting Secure Boot is still a work-in-progress in most Linux distributions.

2
  • I've also gotten it to boot with Secure Boot ON by changing the Template option underneath the checkbox to "Microsoft UEFI Certificate Authority". Aug 2, 2016 at 23:02
  • This is an older thread. Just to clarify as of 05/2018, you can create CentOS 7 VMs in Hyper-V. I have a bunch. You still have to disable secure boot though.
    – Adam
    May 4, 2018 at 15:58
2

I suspect more recent versions of CentOS will eventually no longer have the issue you faced (see https://bugzilla.redhat.com/show_bug.cgi?id=1192030 for the same issue in Fedora)

4
  • Could you please check if that's the case? Oct 10, 2015 at 13:42
  • 1
    @DeerHunter: I'm not a CentOS user so I can't check but if your CentOS LiveOS ISO's initrd.img doesn't have hv_vmbus.ko.xz inside you're going to see breakage. I wasn't saying it is already fixed at the time of writing (10th Oct 2015) because the Bugzilla link says it's still broken today (11th) in Fedora 23 Beta (and Fedora generally gets fixes quicker than CentOS). However this issue is the same as Fedora's and fixing it there should eventually help CentOS (I suspect the gap between the two will be smaller if a CentOS user raises a separate bug report pointing to the Fedora one hinthint :-).
    – Anon
    Oct 11, 2015 at 15:41
  • This issue is now fixed in Fedora 23 (3rd November 2015) - if you're CentOS person it should be easy to open a bugzilla bug pointing at the Fedora one to have the fix ported over!
    – Anon
    Nov 4, 2015 at 6:32
  • 1
    It's a bit more complicated, livecd-tools needs to be patched and then used in brew/koji buildroot. I created backport request into RHEL7: bugzilla.redhat.com/show_bug.cgi?id=1595574
    – lzap
    Jun 27, 2018 at 7:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .