KVM source code download (three methods ):
KVM. Git download: git clone http://git.kernel.org/pub/scm/virt/kvm/kvm.git/
Linux. Git download: git clone http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
Linux kernel source code download: wget https://cdn.kernel.org/pub/linux/kernel/v3.x/linux-3.2.84.tar.xz
Install the development environment: Yum groupinstall "development tools" "additional development"
Compile the kernel:
Can CP/boot/config-2.6.32-431.el6.x86_64 to the kernel source code compiling directory (here suppose/usr/local/src/KVM. Git) name. config
CD/usr/local/src/KVM. Git
CP/boot/config-2.6.32-431.el6.x86_64. config
Make menuconfig (select virtualization for kernel)
Make vmlinux-J 30 (compile core,-J specifies the number of threads used for GCC compilation, which is about twice the total CPU core. I have 16 cores)
Make bzimage (create bzimage, which is used for initramfs)
Make modules-J 30 (compilation module)
Make modules_install (module installation)
Make install (kernel installation, grub modification, etc)
After compilation, modify the default startup option default of grub. conf. After restart, check whether the kernel is the compiled kernel and check whether the module KVM is loaded. If not:
Intel series: modprobe KVM; modprobe kvm_intel
AMD series: modprobekvm; modprobe kvm_amd
Eqmu download:
Git clone http://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
Install eqmu:
-- Configure help allows you to view the corresponding parameters
./Configure -- enable-VNC -- enable-KVM
Make & make install
Install vhost:
1. Create a hard disk image
Dd If =/dev/Zero of = rhel6u5. img bs = 4096 COUNT = 1024000
2. Installation System for Hard Disk Images
Qemu-system-x86_64-M 2048-SMP 2-boot order = Cd-hda./rhel6u5. IMG-CDROM CentOS-6.5-x86_64-minimal.iso &
-M: Specifies the size of the allocated memory.
-SMP: CPU core allocation
-Boot order: Specify the boot sequence. c Indicates CDRom and D indicates disk.
-Hda: Specifies the hard disk image.
-CDROM: Specifies the image file (here is the system installation image)
-VNC: Specifies the socket for the vncserver to listen to (for example, 0.0.0.0: 5900, it will listen to 0.0.0.0: 11800, and the switch will be black even if the graphical interface connection is installed, therefore, it is discarded and the cause is to be identified before modification. Default listening: 1: 5900, that is, the local socket of IPv6
3. If VNC is used above, it can only be connected locally with a client, and VNC depends on the graphic interface. Therefore, we have installed a local desktop KDE and a non-eqmu VNC for our remote graphic interface access.
(1) install the graphic interface KDE
Yum groupinstall "KDE Desktop"-y
(2) install the VNC and VNC clients
Yum install tigervnc-server-y
(3) Configure VNC
Vncpasswd (set VNC password)
Vncserver)
(4) After the connection, use the vncviewer: 5900 command on the terminal to configure and install the system on the GUI.
650) This. width = 650; "src =" http://s4.51cto.com/wyfs02/M02/8A/8E/wKioL1g0Cyjg166xAANwBB-UcWI194.png-wh_500x0-wm_3-wmp_4-s_2491112987.png "Title =" 2366cam4xriziz@h661(nq1_t3.png "alt =" wKioL1g0Cyjg166xAANwBB-UcWI194.png-wh_50 "/>
KVM compilation and Installation