Hyper-V: Linux VM hangs when enabling using more than 1 cpu

lancethepants 0 Reputation points

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.


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.


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.


A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,601 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 32,326 Reputation points Microsoft Vendor

    Hi lancethepants,

    Hope you're doing well.

    Here are a few steps and suggestions to troubleshoot and potentially resolve this issue:

    1. Ensure that your kernel configuration includes all necessary Hyper-V options. Besides "CONFIG_HYPERV", you should enable:










    These options can help ensure compatibility and stability with Hyper-V's features.

    1. 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.

    1. 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.

    1. 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.

    0 comments No comments