简体   繁体   English

尝试访问ubuntu 14.04中的KVM代码时遇到问题

[英]Trouble trying to access KVM code in ubuntu 14.04

我的虚拟化项目要求我对KVM的vmx.c文件进行更改。我已经在Ubuntu 14.04操作系统中安装了KVM,并且还完成了启动实例的操作。但是,当我在系统中查找vmx.c时,我确实找不到它,尽管我在以下目录/usr/src/linux-headers-3.19.0-30/arch/x86/include/asm中找到了vmx.h文件,如果有人可以指导我我该怎么办。谢谢您!

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: 为了能够在不重新编译所有内核的情况下修改KVM,可以使用Jan Kiszka的存储库来构建外部KVM模块,如下所示:

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. 之后,您可以在kvm-kmod/x86/找到所需的文件,然后可以根据需要对其进行修改。 To install your modified version you can use run from the kvm-mod directory: 要安装修改后的版本,可以使用kvm-mod目录中的run:

    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 ;) 您可以将这些命令放在脚本文件中,以避免每次都键入它们;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM