Where does qemu pull modules from when using a custom-built kernel (using -kernel)? Will the kernel try to find them in the guest FS or is the whole linux/qemu setup smart enough to realize that modules should be pulled from the custom-built kernel set up on the host?

1 Answer 1


-kernel only says where to load a kernel from, nothing else. It's like telling the bootloader in real hardware "load this kernel file". Once the guest kernel has booted, it is what makes the decision about where to look for modules (or even whether to look for modules at all). So the modules have to be in the guest filesystem.

Personally I usually try to use a non-modules kernel if I'm doing development and booting a kernel with -kernel.

  • That's good and makes sense. The question comes to mind because I want to play with bonding and its parameters can be set at module load time... but I compiled it statically. In this case how can I modify the values? I created a separate question for that: unix.stackexchange.com/questions/649632/…
    – eftshift0
    May 14, 2021 at 13:03

You must log in to answer this question.

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