Trouble trying to access KVM code in ubuntu 14.04

北战南征 提交于 2019-12-24 15:12:07

问题


My virtualization project requires me to make changes in the vmx.c file of KVM.I have installed KVM in my Ubuntu 14.04 OS and am done launching an instance too.Yet,when I look up for vmx.c in the system,I do not find it.I though find a vmx.h file in the following directory /usr/src/linux-headers-3.19.0-30/arch/x86/include/asm.It would be really helpful if someone could guide me as to how do I go about it.Thank you in advance!


回答1:


To be able to modify KVM without recompiling all the kernel, you can use Jan Kiszka's repo for building an external KVM module as following:

git clone git://git.kiszka.org/kvm-kmod.git
cd kvm-kmod
git submodule update --init
./configure
make sync
make

You can find after that the files you need in kvm-kmod/x86/ and you can modify them as you need. To install your modified version you can use run from the kvm-mod directory:

    make
    sudo su
    rmmod kvm-intel
    rmmod kvm
    insmod kvm
    insmod kvm-intel

You can put these commands in a script file to avoid typing them each time ;)



来源:https://stackoverflow.com/questions/33384340/trouble-trying-to-access-kvm-code-in-ubuntu-14-04

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!