I had enabled "CONFIG_HYPERV_VTL_MODE". Disabling that fixed the issue.
Hyper-V: Linux VM hangs when enabling using more than 1 cpu
I'm trying to get my linux router OS project running in Hyper-V, but am hitting a snag when enabling more than 1 cpu.
This is my linux config file.
https://github.com/tomato64/tomato64/blob/master/tomato64/board/x86_64/linux.config
Windows 10
hyper-v gen2 vm
kernel 6.6.31
I've enabled everything listed in the below gentoo link. The only hyperv thing not enabled is HYPERV_TESTING. Maybe I should try enabling it but I haven't yet.
https://wiki.gentoo.org/wiki/Hyper-V
So while I have only 1 cpu selected in the VM config, it boots fine and runs as expected. The only change I make is from 1 to 2 cpus. After that change I will see the grub menu come up, but after that the screen goes blank and I see nothing else. SMP is enabled, so I'm not sure what is going on here.
https://github.com/tomato64/tomato64/blob/master/tomato64/board/x86_64/linux.config#L37
Windows for business | Windows Client for IT Pros | Storage high availability | Virtualization and Hyper-V
2 answers
Sort by: Most helpful
-
Anonymous
2024-05-23T03:51:58.9966667+00:00 Hi lancethepants,
Hope you're doing well.
Here are a few steps and suggestions to troubleshoot and potentially resolve this issue:
- Ensure that your kernel configuration includes all necessary Hyper-V options. Besides "CONFIG_HYPERV", you should enable:
"CONFIG_HYPERV_UTILS"
"CONFIG_HYPERV_BALLOON"
"CONFIG_HYPERV_NET"
"CONFIG_HYPERV_STORAGE"
"CONFIG_HYPERV_KEYBOARD"
"CONFIG_HYPERV_IOMMU"
"CONFIG_HYPERV_FCOPY"
"CONFIG_HYPERV_KVP"
"CONFIG_HYPERV_SOCK"
These options can help ensure compatibility and stability with Hyper-V's features.
- Sometimes, kernel parameters can affect the boot process. You can try adding or modifying kernel parameters in the GRUB configuration. Here are a few parameters that might help:
"maxcpus=2" - Limits the number of CPUs.
"noapic" - Disables APIC.
"nolapic" - Disables LAPIC.
"acpi=off" - Disables ACPI.
You can add these parameters to the kernel line in your GRUB configuration.
- Check your kernel configuration specifically around SMP (Symmetric Multi-Processing) settings:
"CONFIG_SMP" - Ensure this is enabled.
"CONFIG_NR_CPUS" - Ensure this is set to a value greater than 1.
"CONFIG_X86_LOCAL_APIC" - Ensure this is enabled.
"CONFIG_X86_IO_APIC" - Ensure this is enabled.
- Ensure that the Hyper-V Integration Services are up to date.
Best Regards,
Ian Xue
If the Answer is helpful, please click "Accept Answer" and upvote it.