Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 698140 - kernel fails to boot on Hyper-V 2019 Gen 2 Virtual Machine because drivers are not compiled in
Summary: kernel fails to boot on Hyper-V 2019 Gen 2 Virtual Machine because drivers ar...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: AMD64 Other
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-20 17:42 UTC by jrp
Modified: 2020-06-23 15:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jrp 2019-10-20 17:42:26 UTC
The default kernel doesn't boot in a Hyper-V 2019 Gen 2 Virtual Machine. (Something about the squashfs, no keyboard. Following the suggested CD mount delay doesn't help.)

Same symptoms as reported in 2017 at https://forums.gentoo.org/viewtopic-t-1056806-start-0.html 

I got the system up by booting with an Ubuntu LiveCD and building a new kernel using the default kernel config augmented by the Hyper-V settings described at https://wiki.gentoo.org/wiki/Hyper-V. 

This suggests that the Hyper-V drivers are not built into the default kernel, and they could/should be.

Ideally, I'd be able to use a 5.3 kernel and pick up the Microsoft Azure patches / settings (eg, via Ubuntu or Red Hat or Lentos/Fedora who provide Azure/Hyper-v kernels), or use the ones that Intel offer in their Clear distribution, as I haven't been able to find them for Kernel 4.19. This should provide a much slimmer kernel.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-10-20 21:17:50 UTC
OK, now what do we do now that we know that a kernel does not boot on some hardware? Where is the bug you intended to report?
Comment 2 jrp 2019-10-21 07:48:58 UTC
I raised this issue in the forums and was advised to report it here.

I assume that the genkernel settings need to be adjusted to include the Hyper-V platform.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2019-10-21 07:54:31 UTC
(In reply to jrp from comment #2)
> I raised this issue in the forums and was advised to report it here.
> 
> I assume that the genkernel settings need to be adjusted to include the
> Hyper-V platform.

How? Nothing in this bug report suggests that genkernel is doing something wrong or how to fix it. Instead of pointing to a discussion on the forums, your bug report should at least describe the problem clearly and uniquely and in the best case provide a (path to a) bug fix as well.
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2019-10-21 11:06:15 UTC
Did you use genkernel? Which version?

In this case please try latest genkernel-4 (=sys-kernel/genkernel-4.0.0_beta20 at the time of writing this comment) and run `genkernel --hyperv all`.
Comment 5 jrp 2019-10-21 11:40:47 UTC
Starting from complete scratch, I downloaded the Gentoo startup amd64 / x86_64 boot / installation disk and found that it wouldn't boot under Hyper-V.

All I am suggesting is that that initial boot / installation amd64 disks should include Hyper-V driver support.  I assume that that disk is prepared by genkernel.
Comment 6 Thomas Deutschmann (RETIRED) gentoo-dev 2019-10-21 11:45:03 UTC
Please tell us exactly which image you loaded (name the URL). Keep in mind that this has nothing to do with your initial report and you should file an own bug for this.

And please answer my previous questions.
Comment 7 Ben Kohler gentoo-dev 2019-10-21 15:31:55 UTC
The release engineering team doesn't use genkernel defaults, we have our own kernel configs.  For amd64, that is currently at:

https://gitweb.gentoo.org/proj/releng.git/tree/releases/weekly/kconfig/amd64/installcd-4.14.52.config

Please tell us what installcd you used and what kernel configuration options you believe will fix the boot problem.
Comment 8 jrp 2019-10-21 17:33:53 UTC
Thanks, Ben.

Apologies for leading everyone up the garden path with genkernal; I had assumed that that was what was used to build the installation media. I didn't use genkerenal 3.5.3.3 myself to generate a loadable kernel, but just justed the defconfig + the settings described below.

I tried to install from install-amd64-minimal-20191009T214503Z.iso

I believe that the kernel setting that are needed are described at https://wiki.gentoo.org/wiki/Hyper-V

This page https://www.funtoo.org/HyperV_Kernel_Configuration describes the order in which the options can be enabled because latter options aren't available until earlier options are enabled.

john
Comment 9 Thomas Deutschmann (RETIRED) gentoo-dev 2020-06-23 15:58:15 UTC
I am closing this bug as WORKSFORME:

I successfully booted admincd-amd64-20200605T133220Z.iso on Hyper-V Gen 2 (v9.0) on Windows Server build 2004 and installed Gentoo following handbook.
During the process I built a kernel using `genkernel --hyperv all` using genkernel-4.0.7-r1 which worked and booted the VM.

If you are still experiencing some problem please tell us exactly how to reproduce.