Add module to VyOS Kernel


#1

Hi,
I would like to add a kvm module to VyOS kernel.

Is that possible ?

I failed recompiling the kernel beacause of the build directory missing.
Does a faqs or how to exist for recompiling while adding new module ?

Thank you verys much.

EDIT: here is what i got when trying to build the module:

root@vyos:~/kvm-kmod# make LINUX=../kvm clean sync all make -C /usr/src/linux-image/debian/build/build-i386-none-586-vyos M=`pwd` clean make[1]: Entering directory `/usr/src/linux-image/debian/build/build-i386-none-586-vyos' CLEAN /root/kvm-kmod/.tmp_versions make[1]: Leaving directory `/usr/src/linux-image/debian/build/build-i386-none-586-vyos' ./sync -v for-linus-524-ge35b8d9b -l ../kvm make -C /usr/src/linux-image/debian/build/build-i386-none-586-vyos M=`pwd` \ LINUXINCLUDE="-I`pwd`/include -I`pwd`/include/uapi -Iinclude \ -Iinclude/uapi -Iarch/x86/include -Iarch/x86/include/uapi \ -Iinclude/generated/uapi -Iarch/x86/include/generated \ -Iarch/x86/include/generated/uapi \ -I`pwd`/include-compat -I`pwd`/x86 \ -include include/generated/autoconf.h \ -include `pwd`/x86/external-module-compat.h" \ "$@" make[1]: Entering directory `/usr/src/linux-image/debian/build/build-i386-none-586-vyos' LD /root/kvm-kmod/x86/built-in.o CC [M] /root/kvm-kmod/x86/svm.o In file included from <command-line>:0: /root/kvm-kmod/x86/external-module-compat.h:527:2: error: #error Preemption notifier emulation does not work for this kernel. make[3]: *** [/root/kvm-kmod/x86/svm.o] Error 1 make[2]: *** [/root/kvm-kmod/x86] Error 2 make[1]: *** [_module_/root/kvm-kmod] Error 2 make[1]: Leaving directory `/usr/src/linux-image/debian/build/build-i386-none-586-vyos' make: *** [all] Error 2

Seems that’s not possible with this kernel.


#2

Hello louinel.

This URL might be help.
http://vyos.net/wiki/Rebuild_VyOS_kernel_Step


Hiroyuki Sato


#3

Hi hiroysato,

Thanks for the info, i did rebuild the kernel, all thing went ok, but still no kvm modules.

I found that on: linux-3.13_3.13.11-1+vyos1+helium6_amd64.changes

[code][ VyOS build user ]

    • Disabled Virtualization (CONFIG_VIRTUALIZATION), since a router is
      not ment to be a kvm host[/code]

When i do a make menuconfig, i see that virtualization is checked.
Is there another config file may be VyOS Build user where i should configure to enable virtualization.

Thx


#4

Hello louinel.

Probably you have to edit those files




Before

CONFIG_VIRTUALIZATION is not set

After

CONFIG_VIRTUALIZATION=m

Maybe you have to enable another switch.


Hiroyuki Sato.


#5

Rather than using Vyos as a KVM host, build a different KVM host (centos or any of the other options), and run stock VYos as a KVM guest inside it.


#6

Just to close this thread.
to those interested: you have to modify the file amd64-vyos and include au config related to kvm.