尝试访问ubuntu 14.04中的KVM代码时遇到问题 [英] Trouble trying to access KVM code in ubuntu 14.04
问题描述
我的虚拟化项目要求我对KVM的vmx.c文件进行更改.我已经在Ubuntu 14.04操作系统中安装了KVM,并且还完成了启动实例的操作. ,我没有找到.虽然我在以下目录/usr/src/linux-headers-3.19.0-30/arch/x86/include/asm中找到了vmx.h文件.如果有人可以指导我如何去做.谢谢您!
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!
推荐答案
要能够在不重新编译所有内核的情况下修改KVM,可以使用Jan Kiszka的repo来构建外部KVM模块,如下所示:
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
之后,您可以在kvm-kmod/x86/
中找到所需的文件,然后可以根据需要对其进行修改.
要安装修改后的版本,可以使用kvm-mod
目录中的run:
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 ;)
这篇关于尝试访问ubuntu 14.04中的KVM代码时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!